]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Tweak STRING_AGG() arguments (expects TEXT or BYTEA)
[Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                 </fields>
85                 <links>
86                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
87                 </links>
88         </class>
89
90         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
91                 <fields>
92                         <field name="workstation" oils_persist:virtual="true" />
93                         <field name="cash_payment" oils_persist:virtual="true" />
94                         <field name="check_payment" oils_persist:virtual="true" />
95                         <field name="credit_card_payment" oils_persist:virtual="true" />
96                 </fields>
97                 <links>
98                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
99                 </links>
100         </class>
101
102         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
103                 <fields>
104                         <field name="id" oils_persist:virtual="true" />
105                         <field name="children" oils_persist:virtual="true" />
106                         <field name="owner_doc" oils_persist:virtual="true" />
107                         <field name="intra_doc_id" oils_persist:virtual="true" />
108                         <field name="parent_node" oils_persist:virtual="true" />
109                         <field name="node_type" oils_persist:virtual="true" />
110                         <field name="namespace_uri" oils_persist:virtual="true" />
111                         <field name="name" oils_persist:virtual="true" />
112                         <field name="value" oils_persist:virtual="true" />
113                 </fields>
114         </class>
115
116         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
117                 <fields>
118                         <field name="title" oils_persist:virtual="true" />
119                         <field name="author" oils_persist:virtual="true" />
120                         <field name="doc_id" oils_persist:virtual="true" />
121                         <field name="doc_type" oils_persist:virtual="true" />
122                         <field name="pubdate" oils_persist:virtual="true" />
123                         <field name="isbn" oils_persist:virtual="true" />
124                         <field name="publisher" oils_persist:virtual="true" />
125                         <field name="tcn" oils_persist:virtual="true" />
126                         <field name="subject" oils_persist:virtual="true" />
127                         <field name="types_of_resource" oils_persist:virtual="true" />
128                         <field name="call_numbers" oils_persist:virtual="true" />
129                         <field name="edition" oils_persist:virtual="true" />
130                         <field name="online_loc" oils_persist:virtual="true" />
131                         <field name="synopsis" oils_persist:virtual="true" />
132                         <field name="physical_description" oils_persist:virtual="true" />
133                         <field name="toc" oils_persist:virtual="true" />
134                         <field name="copy_count" oils_persist:virtual="true" />
135                         <field name="series" oils_persist:virtual="true" />
136                         <field name="serials" oils_persist:virtual="true" />
137                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
142                 <fields>
143                         <field name="err_msg" oils_persist:virtual="true" />
144                         <field name="type" oils_persist:virtual="true" />
145                 </fields>
146         </class>
147
148         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
149                 <fields>
150                         <field name="err_msg" oils_persist:virtual="true" />
151                         <field name="type" oils_persist:virtual="true" />
152                 </fields>
153         </class>
154
155         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
156                 <fields oils_persist:primary="matchpoint">
157                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
158                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
159                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
160                 </fields>
161                 <links>
162                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
163                 </links>
164         </class>
165
166         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
167         <!-- when the time is right, turn me into a view.  -->
168                 <fields>
169             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
170             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
171             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
172             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
174             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
176             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
178             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
179                 </fields>
180         </class>
181
182         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
183                 <fields>
184                         <field name="public_name" oils_persist:virtual="true" />
185                         <field name="target_url" oils_persist:virtual="true" />
186                         <field name="target_coverage" oils_persist:virtual="true" />
187                         <field name="target_embargo" oils_persist:virtual="true" />
188                 </fields>
189         </class>
190
191         <!-- Actually in the DB -->
192         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
193                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
194                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
195                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
196                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
197                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
198                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
199                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
200                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
201                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
202                 </fields>
203                 <links>
204                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
205                 </links>
206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
207                         <actions>
208                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
209                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
210                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
211                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
212                         </actions>
213                 </permacrud>
214         </class>
215
216         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
217                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
218                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
219                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
220                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
221                 </fields>
222                 <links>
223                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
224                 </links>
225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
226                         <actions>
227                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
228                     <context link="grp" field="owner"/>
229                 </create>
230                                 <retrieve/>
231                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
232                     <context link="grp" field="owner"/>
233                 </update>
234                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
235                     <context link="grp" field="owner"/>
236                 </delete>
237                         </actions>
238                 </permacrud>
239         </class>
240
241         <class  id="vibtg" 
242             controller="open-ils.cstore open-ils.pcrud" 
243             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
244             oils_persist:tablename="vandelay.import_bib_trash_group" 
245             reporter:label="Import/Overlay Field Groups for Removal">
246                 <fields oils_persist:primary="id" 
247                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
248                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
249                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
250                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
251                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
252                 </fields>
253                 <links>
254                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
255                 </links>
256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
257                         <actions>
258                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
259                                 <retrieve/>
260                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
261                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266
267         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
268                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
269                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
270                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
271                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
272                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
273                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
274                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
275                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
276                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
277                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
278                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
279                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
280                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
281                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
282                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
283                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
284                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
285                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
286                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
287                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
288                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
289                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
290                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
291                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
292                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
293                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
294                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
295                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
296                 </fields>
297                 <links>
298                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
299                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
300                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
301                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
302                 </links>
303                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
304                         <actions>
305                                 <create permission="CREATE_IMPORT_ITEM">
306                     <context link="definition" field="owner"/>
307                                 </create>
308                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
309                     <context link="definition" field="owner"/>
310                                 </retrieve>
311                                 <update permission="UPDATE_IMPORT_ITEM">
312                     <context link="definition" field="owner"/>
313                                 </update>
314                                 <delete permission="DELETE_IMPORT_ITEM">
315                     <context link="definition" field="owner"/>
316                                 </delete>
317                         </actions>
318                 </permacrud>
319         </class>
320
321         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
322                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
323                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
324                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
325                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
326                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
327                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
328                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
329                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
330                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
331                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
332                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
333                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
334                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
335                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
336                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
337                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
338                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
339                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
340                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
341                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
342                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
343                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
344                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
345                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
346                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
347                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                 </links>
352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
353                         <actions>
354                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
355                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
356                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
357                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
358                         </actions>
359                 </permacrud>
360         </class>
361
362         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
363                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
364                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
365                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
366                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
367                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
368                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
369                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
370                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
371                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
372                 </fields>
373                 <links>
374                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
375                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
376                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
377                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
378                 </links>
379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
380                         <actions>
381                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
382                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
383                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
385                         </actions>
386                 </permacrud>
387         </class>
388
389         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
390                 <fields oils_persist:primary="code">
391                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
392                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
393                 </fields>
394                 <links>
395                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
396                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <retrieve/>
402                         </actions>
403                 </permacrud>
404         </class>
405
406         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
407                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
408                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
409                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
410                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
411                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
412                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
413                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
414                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
415                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
416                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
417                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
418                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
419                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
420                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
421                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
422                 </fields>
423                 <links>
424                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
425                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
426                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
427                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
428             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
429             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
430             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
431                 </links>
432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
433                         <actions>
434                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
435                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
436                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
437                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
438                         </actions>
439                 </permacrud>
440         </class>
441
442         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
443                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
444                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
445                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
446                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
447                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
448                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
449                 </fields>
450                 <links/>
451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
452                         <actions>
453                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
454                 <retrieve/>
455                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
456                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
457                         </actions>
458                 </permacrud>
459         </class>
460
461         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
462                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
463                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
464                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
465                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
466                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
467                 </fields>
468                 <links>
469                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
470                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
471                 </links>
472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
473                         <actions>
474                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
475                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
476                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
477                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
478                         </actions>
479                 </permacrud>
480         </class>
481
482         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
483                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
484                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
485                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
486                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
487                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
488                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
489                 </fields>
490                 <links>
491                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
492                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
493                 </links>
494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
495                         <actions>
496                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
497                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
498                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
499                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
500                         </actions>
501                 </permacrud>
502         </class>
503
504         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
505                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
506                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
507                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
508                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
509                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
510                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
511                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
512                 </fields>
513                 <links>
514                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
515                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
516                 </links>
517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
518                         <actions>
519                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
520                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
521                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
522                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                         </actions>
524                 </permacrud>
525         </class>
526
527         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
528                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
529                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
530                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
531                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
532                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
533                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
534                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
535                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
536                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
537                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
538                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
539                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
540                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
541                 </fields>
542                 <links>
543                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
544                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
545                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
546             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
547             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
548                 </links>
549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
550                         <actions>
551                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
552                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
553                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
554                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                         </actions>
556                 </permacrud>
557         </class>
558
559         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
560                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
561                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
562                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
563                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
564                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
565                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
566                 </fields>
567                 <links/>
568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
569                         <actions>
570                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
571                 <retrieve/>
572                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
573                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                         </actions>
575                 </permacrud>
576         </class>
577
578         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
579                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
580                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
581                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
582                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
583                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
584                 </fields>
585                 <links>
586                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
587                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
588                 </links>
589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
590                         <actions>
591                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
592                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
593                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
594                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                         </actions>
596                 </permacrud>
597         </class>
598
599         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
600                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
601                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
602                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
603                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
604                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
605                 </fields>
606                 <links>
607                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
608                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
609                 </links>
610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
611                         <actions>
612                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
613                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
614                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
615                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
616                         </actions>
617                 </permacrud>
618         </class>
619
620         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
621                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
622                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
623                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
624                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
625                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
626                 </fields>
627                 <links>
628                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
629                 </links>
630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
631                         <actions>
632                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
633                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
634                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
635                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
636                         </actions>
637                 </permacrud>
638         </class>
639
640         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
641                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
642                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
643                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
644                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
645                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
646                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
647                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
648                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
649             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
650                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
651                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
652                 </fields>
653                 <links>
654                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
655                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
656                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
657                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
658                 </links>
659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
660                         <actions>
661                                 <create permission="ADMIN_IMPORT_MATCH_SET">
662                     <context link="match_set" field="owner"/>
663                                 </create>
664                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
665                     <context link="match_set" field="owner"/>
666                                 </retrieve>
667                                 <update permission="ADMIN_IMPORT_MATCH_SET">
668                     <context link="match_set" field="owner"/>
669                                 </update>
670                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
671                     <context link="match_set" field="owner"/>
672                                 </delete>
673                         </actions>
674                 </permacrud>
675         </class>
676
677         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
678                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
679                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
680                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
681                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
682                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
683                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
684                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
685                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
686                 </fields>
687                 <links>
688                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
689                 </links>
690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
691                         <actions>
692                                 <create permission="ADMIN_IMPORT_MATCH_SET">
693                     <context link="match_set" field="owner"/>
694                                 </create>
695                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
696                     <context link="match_set" field="owner"/>
697                                 </retrieve>
698                                 <update permission="ADMIN_IMPORT_MATCH_SET">
699                     <context link="match_set" field="owner"/>
700                                 </update>
701                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
702                     <context link="match_set" field="owner"/>
703                                 </delete>
704                         </actions>
705                 </permacrud>
706         </class>
707
708         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
709                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
710                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
711                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
712                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
713                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
714                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
715                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
716                 </fields>
717                 <links>
718                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
719                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
720                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
721                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
722                 </links>
723         </class>
724
725     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
726         <fields oils_persist:primary="name">
727             <field reporter:label="Name" name="name" reporter:datatype="text"/>
728             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
729             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
730             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
731         </fields>
732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
733             <actions>
734                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
735                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
736                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
737                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
738             </actions>
739         </permacrud>
740     </class>
741
742     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
743         <fields oils_persist:primary="id">
744             <field reporter:label="ID" name="id" reporter:datatype="id"/>
745             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
746             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
747             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
748             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
749         </fields>
750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
751             <actions>
752                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
753                 <retrieve/>
754                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
755                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
756             </actions>
757         </permacrud>
758     </class>
759
760         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
761                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
762                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
763                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
764                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
765                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
766                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
767                 </fields>
768                 <links>
769                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
770                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
771                 </links>
772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
773             <actions>
774                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
775                 <retrieve/>
776                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
778             </actions>
779         </permacrud>
780         </class>
781
782         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
783                 <fields oils_persist:primary="name">
784                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
785                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
786                         <field reporter:label="Description" name="description" reporter:datatype="text" />
787                         <field reporter:label="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                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2130                 </fields>
2131                 <links>
2132                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2133                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2134                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2135                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2136                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2137                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2138                 </links>
2139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2140                         <actions>
2141                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2142                                 <retrieve/>
2143                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2144                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2145                         </actions>
2146                 </permacrud>
2147         </class>
2148
2149         <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">
2150                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2151                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2152                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2153                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2154                 </fields>
2155                 <links>
2156                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2157                 </links>
2158                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2159                         <actions>
2160                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2161                                 <retrieve/>
2162                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2163                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2164                         </actions>
2165                 </permacrud>
2166         </class>
2167
2168         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2169                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2170                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2171                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2172                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2173                 </fields>
2174                 <links>
2175                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2176                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2177                 </links>
2178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2179                         <actions>
2180                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2181                                 <retrieve/>
2182                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2183                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2184                         </actions>
2185                 </permacrud>
2186         </class>
2187
2188         <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">
2189                 <fields oils_persist:primary="code">
2190                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2191                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2192                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2193                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2194                 </fields>
2195                 <links>
2196                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2197                 </links>
2198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2199                         <actions>
2200                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2201                                 <retrieve/>
2202                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2203                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2204                         </actions>
2205                 </permacrud>
2206         </class>
2207
2208         <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">
2209                 <fields oils_persist:primary="code">
2210                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2211                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2212                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2213                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2214                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2215                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2216                 </fields>
2217                 <links>
2218                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2219                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2220                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2221                 </links>
2222                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2223                         <actions>
2224                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2225                                 <retrieve/>
2226                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2227                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2228                         </actions>
2229                 </permacrud>
2230         </class>
2231
2232     <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">
2233         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2234             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2235             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2236             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2237         </fields>
2238         <links>
2239             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2240             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2241         </links>
2242         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2243             <actions>
2244                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2245                 <retrieve/>
2246                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2247                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2248             </actions>
2249         </permacrud>
2250     </class>
2251
2252         <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">
2253                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2254                         <field name="active" reporter:datatype="bool"/>
2255                         <field name="create_date" reporter:datatype="timestamp"/>
2256                         <field name="creator" />
2257                         <field name="deleted" reporter:datatype="bool"/>
2258                         <field name="edit_date" reporter:datatype="timestamp"/>
2259                         <field name="editor" />
2260                         <field name="id" reporter:datatype="id" />
2261                         <field name="last_xact_id" />
2262                         <field name="marc" />
2263                         <field name="source" />
2264                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2265                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2266                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2267                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2268                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2269                 </fields>
2270                 <links>
2271                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2272                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2273                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2274                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2275                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2276                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2277                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2278                 </links>
2279                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2280                         <actions>
2281                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2282                                 <retrieve/>
2283                                 <update permission="UPDATE_MARC" global_required="true"/>
2284                                 <delete permission="UPDATE_MARC" global_required="true"/>
2285                         </actions>
2286                 </permacrud>
2287         </class>
2288         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2289                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2290                         <field name="char_encoding" />
2291                         <field name="id" />
2292                         <field name="record" />
2293                         <field name="record_status" />
2294                         <field name="thesaurus" />
2295                 </fields>
2296                 <links>
2297                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2298                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2299                 </links>
2300         </class>
2301         <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">
2302                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2303                         <field name="id" reporter:datatype="id" />
2304                         <field name="bib" reporter:datatype="link" />
2305                         <field name="authority" reporter:datatype="link" />
2306                 </fields>
2307                 <links>
2308                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2309                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2310                 </links>
2311         </class>
2312         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2313                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2314                         <field name="id" reporter:datatype="id" />
2315                         <field name="record" reporter:datatype="link" />
2316                         <field name="atag" reporter:datatype="link" />
2317                         <field name="value" reporter:datatype="text" />
2318                 </fields>
2319                 <links>
2320                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2321                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2322                 </links>
2323         </class>
2324         <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">
2325                 <fields oils_persist:primary="code" oils_persist:sequence="">
2326                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2327                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2328                 </fields>
2329                 <links/>
2330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2331             <actions>
2332                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2333                 <retrieve/>
2334                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2335                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2336             </actions>
2337         </permacrud>
2338         </class>
2339         <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">
2340                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2341                         <field name="accepting_usr" />
2342                         <field name="amount" reporter:datatype="money" />
2343                         <field name="amount_collected" reporter:datatype="money" />
2344                         <field name="approval_code" reporter:datatype="text"/>
2345                         <field name="cash_drawer" reporter:datatype="link"/>
2346                         <field name="cc_first_name" reporter:datatype="text"/>
2347                         <field name="cc_last_name" reporter:datatype="text"/>
2348                         <field name="cc_number" reporter:datatype="text"/>
2349                         <field name="cc_order_number" reporter:datatype="text"/>
2350                         <field name="cc_type" reporter:datatype="text"/>
2351                         <field name="cc_processor" reporter:datatype="text"/>
2352                         <field name="expire_month" reporter:datatype="int" />
2353                         <field name="expire_year" reporter:datatype="int" />
2354                         <field name="id" reporter:datatype="id" />
2355                         <field name="note" reporter:datatype="text"/>
2356                         <field name="payment_ts" reporter:datatype="timestamp"/>
2357                         <field name="xact" reporter:datatype="link"/>
2358                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2359                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2360                 </fields>
2361                 <links>
2362                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2363                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2364                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2365                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2366                 </links>
2367         </class>
2368         <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">
2369                 <fields oils_persist:primary="name">
2370                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2371                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2372                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2373                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2374                 </fields>
2375                 <links/>
2376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2377             <actions>
2378                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2379                 <retrieve/>
2380                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2381                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2382             </actions>
2383         </permacrud>
2384         </class>
2385
2386         <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">
2387                 <fields oils_persist:primary="alias">
2388                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2389                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2390                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2391                 </fields>
2392                 <links>
2393                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2394                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2395                 </links>
2396         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2397             <actions>
2398                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2399                 <retrieve/>
2400                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2401                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2402             </actions>
2403         </permacrud>
2404         </class>
2405
2406         <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">
2407                 <fields oils_persist:primary="name">
2408                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2409                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2410                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2411                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2412                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2413                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2414                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2415                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2416                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2417                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2418                 </fields>
2419                 <links>
2420                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2421                 </links>
2422         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2423             <actions>
2424                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2425                 <retrieve/>
2426                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2427                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2428             </actions>
2429         </permacrud>
2430         </class>
2431
2432         <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">
2433                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2434                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2435                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2436                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2437                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2438                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2439                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2440                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2441                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2442                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2443                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2444                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2445                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2446                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2447                 </fields>
2448                 <links>
2449                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2450                 </links>
2451         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2452             <actions>
2453                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2454                 <retrieve/>
2455                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2456                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2457             </actions>
2458         </permacrud>
2459         </class>
2460         <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">
2461                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2462                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2463                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2464                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2465                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2466                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2467                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2468                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2469                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2470                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2471                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2472                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2473                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2474                 </fields>
2475                 <links>
2476                 </links>
2477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2478                         <actions>
2479                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2480                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2481                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2482                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2483                         </actions>
2484                 </permacrud>
2485         </class>
2486         <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">
2487                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2488                         <field name="id" reporter:datatype="id" />
2489                         <field name="name" reporter:datatype="text"/>
2490                         <field name="xpath" reporter:datatype="text"/>
2491                         <field name="format" reporter:datatype="link"/>
2492                         <field name="first_word" reporter:datatype="bool" />
2493                 </fields>
2494                 <links/>
2495         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2496             <actions>
2497                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2498                 <retrieve/>
2499                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2500                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2501             </actions>
2502         </permacrud>
2503         </class>
2504         <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">
2505                 <fields oils_persist:primary="code" oils_persist:sequence="">
2506                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2507                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2508                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2509                 </fields>
2510                 <links/>
2511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2512             <actions>
2513                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2514                 <retrieve/>
2515                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2516                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2517             </actions>
2518         </permacrud>
2519         </class>
2520         <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">
2521                 <fields oils_persist:primary="code" oils_persist:sequence="">
2522                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2523                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2524                 </fields>
2525                 <links/>
2526         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2527             <actions>
2528                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2529                 <retrieve/>
2530                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2531                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2532             </actions>
2533         </permacrud>
2534         </class>
2535     <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">
2536         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2537             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2538             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2539             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2540             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2541         </fields>
2542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2543             <actions>
2544                 <retrieve/>
2545             </actions>
2546         </permacrud>
2547     </class>
2548         <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">
2549                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2550                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2551                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2552                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2553                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2554                 </fields>
2555                 <links>
2556                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2557                 </links>
2558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2559             <actions>
2560                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2561                 <retrieve/>
2562                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2563                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2564             </actions>
2565         </permacrud>
2566         </class>
2567         <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">
2568                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2569                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2570                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2571                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2572                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2573                 </fields>
2574                 <links>
2575                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2576                 </links>
2577         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2578             <actions>
2579                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2580                 <retrieve/>
2581                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2582                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2583             </actions>
2584         </permacrud>
2585         </class>
2586         <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">
2587                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2588                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2589                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2590                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2591                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2592                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2593                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2594                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2595                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2596                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2597                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2598                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2599                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2600                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2601                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2602                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2603                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2604                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2605                 </fields>
2606                 <links>
2607                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2608                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2609                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2610                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2611                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2612                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2613                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2614                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2615                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2616                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2617                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2618                 </links>
2619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2620             <actions>
2621                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2622                 <retrieve/>
2623                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2624                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2625             </actions>
2626         </permacrud>
2627         </class>
2628         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2629                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2630                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2631                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2632                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2633                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2634                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2635                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2636                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2637                 </fields>
2638                 <links>
2639                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2640                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2641         </links>
2642         </class>
2643         <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">
2644                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2645                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2646                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2647                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2648                 </fields>
2649                 <links>
2650                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2651                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2652                 </links>
2653         </class>
2654         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2655                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2656                         <field name="id" reporter:datatype="id" />
2657                         <field name="value" oils_persist:i18n="true" />
2658                 </fields>
2659                 <links/>
2660         </class>
2661         <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">
2662                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2663                         <field name="balance_owed" reporter:datatype="money" />
2664                         <field name="total_owed" reporter:datatype="money" />
2665                         <field name="total_paid" reporter:datatype="money" />
2666                         <field name="usr" reporter:datatype="link"/>
2667                 </fields>
2668                 <links>
2669                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2670         </links>
2671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2672             <actions>
2673                 <retrieve permission="VIEW_USER">
2674                     <context link="usr" field="home_ou"/>
2675                 </retrieve>
2676             </actions>
2677         </permacrud>
2678         </class>
2679         <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">
2680                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2681                         <field name="collector" />
2682                         <field name="enter_time" reporter:datatype="timestamp"/>
2683                         <field name="id" reporter:datatype="id" />
2684                         <field name="location" reporter:datatype="link"/>
2685                         <field name="usr" reporter:datatype="link"/>
2686                 </fields>
2687                 <links>
2688                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2689                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2690                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2691                 </links>
2692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2693             <actions>
2694                 <create permission="money.collections_tracker.create" context_field="location"/>
2695                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2696                 <delete permission="money.collections_tracker.create" context_field="location"/>
2697             </actions>
2698         </permacrud>
2699         </class>
2700         <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">
2701                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2702                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2703                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2704                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2705                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2706                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2707                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2708                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2709                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2710                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2711                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2712                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2713                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2714                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2715                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2716                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2717                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2718                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2719                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2720                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2721                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2722                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2723                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2724                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2725                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2726                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2727                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2728                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2729                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2730                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2731                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2732                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2733                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2734                 </fields>
2735                 <links>
2736                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2737                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2738                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2739                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2740                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2741                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2742                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2743                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2744                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2745                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2746                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2747                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2748                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2749                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2750                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2751                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2752                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2753                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2754                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2755                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2756                 </links>
2757         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2758             <actions>
2759                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2760                 <retrieve/>
2761                 <update permission="UPDATE_MARC" global_required="true"/>
2762             </actions>
2763         </permacrud>
2764         </class>
2765         <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">
2766                 <fields oils_persist:primary="id">
2767                         <field name="dow_0_close" />
2768                         <field name="dow_0_open" />
2769                         <field name="dow_1_close" />
2770                         <field name="dow_1_open" />
2771                         <field name="dow_2_close" />
2772                         <field name="dow_2_open" />
2773                         <field name="dow_3_close" />
2774                         <field name="dow_3_open" />
2775                         <field name="dow_4_close" />
2776                         <field name="dow_4_open" />
2777                         <field name="dow_5_close" />
2778                         <field name="dow_5_open" />
2779                         <field name="dow_6_close" />
2780                         <field name="dow_6_open" />
2781                         <field name="id" reporter:datatype="id" />
2782                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2783                 </fields>
2784                 <links>
2785                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2786                 </links>
2787         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2788             <actions>
2789                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2790                 <retrieve/>
2791                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2792                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2793             </actions>
2794         </permacrud>
2795         </class>
2796         <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">
2797                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2798                         <field name="id" reporter:datatype="id" />
2799                         <field name="record" reporter:datatype="link"/>
2800                         <field name="label" reporter:datatype="text"/>
2801                         <field name="label_sortkey" reporter:datatype="text"/>
2802                 </fields>
2803                 <links>
2804                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2805                 </links>
2806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2807             <actions>
2808                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2809                 <retrieve/>
2810                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2811                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2812             </actions>
2813         </permacrud>
2814         </class>
2815         <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">
2816                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2817                         <field name="id" reporter:datatype="id" />
2818                         <field name="target_copy" reporter:datatype="link" />
2819                         <field name="part" reporter:datatype="link"/>
2820                 </fields>
2821                 <links>
2822                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2823                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2824                 </links>
2825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2826             <actions>
2827                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2828                 <retrieve/>
2829                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2830                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2831             </actions>
2832         </permacrud>
2833         </class>
2834         <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">
2835                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2836                         <field name="close_end" reporter:datatype="timestamp" />
2837                         <field name="close_start" reporter:datatype="timestamp" />
2838                         <field name="id" reporter:datatype="id" />
2839                         <field name="org_unit" reporter:datatype="org_unit"/>
2840                         <field name="reason" reporter:datatype="text"/>
2841                 </fields>
2842                 <links>
2843                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2844                 </links>
2845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2846             <actions>
2847                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2848                 <retrieve/>
2849                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2850                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2851             </actions>
2852         </permacrud>
2853         </class>
2854         <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">
2855                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2856                         <field name="extended" reporter:datatype="interval"/>
2857                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2858                         <field name="max_renewals" reporter:datatype="int" />
2859                         <field name="name" reporter:datatype="text"/>
2860                         <field name="normal" reporter:datatype="interval"/>
2861                         <field name="shrt" reporter:datatype="interval"/>
2862                 </fields>
2863                 <links>
2864                 </links>
2865         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2866             <actions>
2867                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2868                 <retrieve/>
2869                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2870                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2871             </actions>
2872         </permacrud>
2873         </class>
2874
2875         <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">
2876                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2877                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2878                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2879             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2880                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2881             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2882                 </fields>
2883                 <links>
2884             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2885                 </links>
2886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2887             <actions>
2888                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2889                 <retrieve/>
2890                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2891                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2892             </actions>
2893                 </permacrud>
2894         </class>
2895
2896         <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">
2897                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2898                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2899                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2900                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2901             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2902                 </fields>
2903                 <links>
2904                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2905                 </links>
2906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2907             <actions>
2908                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2909                 <retrieve/>
2910                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2911                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2912             </actions>
2913                 </permacrud>
2914         </class>
2915
2916         <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">
2917                 <fields oils_persist:primary="id" oils_persist:sequence="">
2918                         <field name="balance_owed" reporter:datatype="money"/>
2919                         <field name="id" reporter:datatype="id" />
2920                         <field name="last_billing_note" reporter:datatype="text"/>
2921                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2922                         <field name="last_billing_type" reporter:datatype="text"/>
2923                         <field name="last_payment_note" reporter:datatype="text"/>
2924                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2925                         <field name="last_payment_type" reporter:datatype="text"/>
2926                         <field name="total_owed" reporter:datatype="money"/>
2927                         <field name="total_paid" reporter:datatype="money"/>
2928                         <field name="usr" reporter:datatype="link"/>
2929                         <field name="xact_finish" reporter:datatype="timestamp" />
2930                         <field name="xact_start" reporter:datatype="timestamp" />
2931                         <field name="xact_type" reporter:datatype="text"/>
2932                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2933                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2934                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2935                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2936                         <field name="billing_location" reporter:datatype="link"/>
2937                 </fields>
2938                 <links>
2939                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2940                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2941                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2942                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2943                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2944                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2945                 </links>
2946         </class>
2947         <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">
2948                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2949                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2950                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2951                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2952                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2953                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2954                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2955                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2956                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2957                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2958                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2959                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2960                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2961                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2962                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2963                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2964                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2965                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2966                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2967                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2968                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2969                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2970                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2971                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2972                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2973                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2974                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2975                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2976                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2977                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2978                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2979                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2980                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2981                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2982                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2983                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2984                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2985                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2986                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2987                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2988                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2989                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2990                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2991                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2992                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2993                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2994                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2995                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2996                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2997                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2998                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2999                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3000                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3001                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3002                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3003                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3004                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3005                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3006                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3007                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3008                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3009                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3010                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3011                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3012                 </fields>
3013                 <links>
3014                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3015                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3016                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3017                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3018                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3019                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3020                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3021                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3022                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3023                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3024                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3025                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3026                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3027                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3028                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3029                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3030                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3031                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3032                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3033                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3034                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3035                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3036                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3037                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3038                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3039                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3040                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3041                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3042                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3043                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3044                 </links>
3045                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3046                         <actions>
3047                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3048                         </actions>
3049                 </permacrud>
3050         </class>
3051         <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">
3052                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3053                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3054                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3055                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3056                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3057                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3058                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3059                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3060                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3061         </fields>
3062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3063                         <actions>
3064                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3065                                 <retrieve/>
3066                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3067                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3068                         </actions>
3069                 </permacrud>
3070         </class>
3071         <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">
3072                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3073                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3074                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3075                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3076                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3077         </fields>
3078         <links>
3079                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3080                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3081                 </links>
3082                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3083                         <actions>
3084                                 <retrieve permission="RUN_REPORTS">
3085                                         <context link="usr" field="home_ou" />
3086                                 </retrieve>
3087                         </actions>
3088                 </permacrud>
3089         </class>
3090         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3091                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3092                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3093                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3094                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3095                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3096                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3097                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3098         </fields>
3099         <links>
3100                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3101                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3102                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3103                 </links>
3104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3105                         <actions>
3106                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3107                                         <context link="usr" field="home_ou" />
3108                                         <context link="ws" field="owning_lib" />
3109                                 </retrieve>
3110                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3111                                         <context link="usr" field="home_ou" />
3112                                         <context link="ws" field="owning_lib" />
3113                                 </create>
3114                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3115                                         <context link="usr" field="home_ou" />
3116                                         <context link="ws" field="owning_lib" />
3117                                 </update>
3118                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3119                                         <context link="usr" field="home_ou" />
3120                                         <context link="ws" field="owning_lib" />
3121                                 </delete>
3122                         </actions>
3123                 </permacrud>
3124         </class>
3125         <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">
3126                 <fields oils_persist:primary="name">
3127                         <field name="name" reporter:datatype="text"/>
3128                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3129                 </fields>
3130                 <links/>
3131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3132                         <actions>
3133                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3134                                 <retrieve/>
3135                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3136                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3137                         </actions>
3138                 </permacrud>
3139         </class>
3140         <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">
3141                 <fields oils_persist:primary="name">
3142                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3143                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3144                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3145                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3146                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3147                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3148                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3149                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3150                 </fields>
3151                 <links>
3152                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3153                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3154                 </links>
3155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3156                         <actions>
3157                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3158                                 <retrieve/>
3159                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3160                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3161                         </actions>
3162                 </permacrud>
3163         </class>
3164         <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">
3165                 <fields oils_persist:primary="name">
3166                         <field name="name" reporter:datatype="text"/>
3167                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3168                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3169                         <field name="datatype" reporter:datatype="text"/>
3170                         <field name="view_perm" reporter:datatype="link"/>
3171                         <field name="update_perm" reporter:datatype="link"/>
3172                         <field name="fm_class" reporter:datatype="text"/>
3173                         <field name="grp" reporter:datatype="link"/>
3174                 </fields>
3175                 <links>
3176                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3177                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3178                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3179                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3180                 </links>
3181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3182                         <actions>
3183                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3184                                 <retrieve/>
3185                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3186                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3187                         </actions>
3188                 </permacrud>
3189         </class>
3190         <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">
3191                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3192                         <field name="id" />
3193                         <field name="name"  reporter:datatype="text"/>
3194                         <field name="org_unit" reporter:datatype="org_unit"/>
3195                         <field name="value"  reporter:datatype="text"/>
3196                 </fields>
3197                 <links>
3198                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3199                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3200                 </links>
3201         </class>
3202         <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">
3203                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3204                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3205                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3206                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3207                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3208                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3209                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3210                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3211                 </fields>
3212                 <links>
3213                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3214                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3215                 </links>
3216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3217             <actions>
3218                 <create permission="CREATE_COPY_NOTE">
3219                     <context link="owning_copy" field="circ_lib"/>
3220                 </create>
3221                 <retrieve permission="VIEW_COPY_NOTES">
3222                     <context link="owning_copy" field="circ_lib"/>
3223                 </retrieve>
3224                 <update permission="UPDATE_COPY_NOTE">
3225                     <context link="owning_copy" field="circ_lib"/>
3226                 </update>
3227                 <delete permission="DELETE_COPY_NOTE">
3228                     <context link="owning_copy" field="circ_lib"/>
3229                 </delete>
3230             </actions>
3231         </permacrud>
3232         </class>
3233         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3234                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3235                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3236                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3237                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3238                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3239                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3240                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3241                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3242                 </fields>
3243                 <links>
3244                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3245                 </links>
3246         </class>
3247         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3248                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3249                         <field name="fingerprint"  reporter:datatype="text"/>
3250                         <field name="id" reporter:datatype="id" />
3251                         <field name="master_record" reporter:datatype="link"/>
3252                         <field name="mods"  reporter:datatype="text"/>
3253                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3254                 </fields>
3255                 <links>
3256                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3257                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3258                 </links>
3259         </class>
3260         <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">
3261                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3262                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3263                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3264                 </fields>
3265                 <links/>
3266         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3267             <actions>
3268                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3269                 <retrieve/>
3270                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3271                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3272             </actions>
3273         </permacrud>
3274         </class>
3275         <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">
3276                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3277                         <field name="code"  reporter:datatype="text"/>
3278                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3279                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3280                 </fields>
3281                 <links/>
3282         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3283             <actions>
3284                 <create permission="CREATE_PERM" global_required="true"/>
3285                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3286                 <update permission="UPDATE_PERM" global_required="true"/>
3287                 <delete permission="DELETE_PERM" global_required="true"/>
3288             </actions>
3289         </permacrud>
3290         </class>
3291         <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">
3292                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3293                         <field name="id" reporter:datatype="id" />
3294                         <field name="metarecord" reporter:datatype="link"/>
3295                         <field name="source" reporter:datatype="link"/>
3296                 </fields>
3297                 <links>
3298                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3299                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3300                 </links>
3301         </class>
3302         <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">
3303                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3304                         <field name="id" reporter:datatype="id" />
3305                         <field name="field" reporter:datatype="link"/>
3306                         <field name="source" reporter:datatype="link"/>
3307                         <field name="value"  reporter:datatype="text"/>
3308                 </fields>
3309                 <links>
3310                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3311                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3312                 </links>
3313         </class>
3314         <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">
3315                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3316                         <field name="id" reporter:datatype="id" />
3317                         <field name="value" reporter:datatype="text"/>
3318                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3319                 </fields>
3320                 <links>
3321                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3322                 </links>
3323         </class>
3324         <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">
3325                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3326                         <field name="id" reporter:datatype="id" />
3327                         <field name="entry" reporter:datatype="link"/>
3328                         <field name="def" reporter:datatype="link"/>
3329                         <field name="source" reporter:datatype="link"/>
3330                 </fields>
3331                 <links>
3332                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3333                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3334                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3335                 </links>
3336         </class>
3337         <class id="mbeshm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_simple_heading_map" oils_persist:tablename="metabib.browse_entry_simple_heading_map" reporter:label="Combined Browse Entry Simple Authority Heading Map" oils_persist:readonly="true">
3338                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3339                         <field name="id" reporter:datatype="id" />
3340                         <field name="entry" reporter:datatype="link"/>
3341                         <field name="simple_heading" reporter:datatype="link"/>
3342                 </fields>
3343                 <links>
3344                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3345                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3346                 </links>
3347         </class>
3348         <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">
3349                 <oils_persist:source_definition>
3350                         SELECT * FROM metabib.author_field_entry
3351                                                 UNION ALL
3352                         SELECT * FROM metabib.keyword_field_entry
3353                                                 UNION ALL
3354                         SELECT * FROM metabib.identifier_field_entry
3355                                                 UNION ALL
3356                         SELECT * FROM metabib.title_field_entry
3357                                                 UNION ALL
3358                         SELECT * FROM metabib.subject_field_entry
3359                                                 UNION ALL
3360                         SELECT * FROM metabib.series_field_entry
3361                 </oils_persist:source_definition>
3362                 <fields>
3363                         <field name="field" reporter:datatype="link"/>
3364                         <field name="id" reporter:datatype="id" />
3365                         <field name="source" reporter:datatype="link"/>
3366                         <field name="value"  reporter:datatype="text"/>
3367                 </fields>
3368                 <links>
3369                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3370                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3371                 </links>
3372         </class>
3373         <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">
3374                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3375                         <field name="field" reporter:datatype="link"/>
3376                         <field name="id" reporter:datatype="id" />
3377                         <field name="source" reporter:datatype="link"/>
3378                         <field name="value"  reporter:datatype="text"/>
3379                 </fields>
3380                 <links>
3381                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3382                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3383                 </links>
3384         </class>
3385         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3386                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3387                         <field name="accepting_usr" reporter:datatype="link"/>
3388                         <field name="amount" reporter:datatype="money" />
3389                         <field name="amount_collected" reporter:datatype="money" />
3390                         <field name="cash_drawer" reporter:datatype="link"/>
3391                         <field name="id" reporter:datatype="id" />
3392                         <field name="note"  reporter:datatype="text"/>
3393                         <field name="payment_ts" reporter:datatype="timestamp"/>
3394                         <field name="xact" reporter:datatype="link"/>
3395                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3396                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3397                 </fields>
3398                 <links>
3399                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3400                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3401                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3402                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3403                 </links>
3404         </class>
3405         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3406                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3407                         <field name="accepting_usr" reporter:datatype="link"/>
3408                         <field name="amount" reporter:datatype="money" />
3409                         <field name="amount_collected" reporter:datatype="money" />
3410                         <field name="id" reporter:datatype="id" />
3411                         <field name="note"  reporter:datatype="text"/>
3412                         <field name="payment_ts" reporter:datatype="timestamp"/>
3413                         <field name="xact" reporter:datatype="link"/>
3414                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3415                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3416                 </fields>
3417                 <links>
3418                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3419                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3420                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3421                 </links>
3422         </class>
3423         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3424                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3425                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3426                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3427                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3428                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3429                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3430                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3431                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3432                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3433                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3434                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3435                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3436                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3437                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3438                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3439                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3440                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3441                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3442                 </fields>
3443                 <links>
3444                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3445                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3446                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3447                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3448                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3449                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3450                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3451                 </links>
3452         </class>
3453
3454         <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">
3455                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3456                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3457                         <field name="name"  reporter:datatype="text"/>
3458                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3459                         <field name="block_list" reporter:datatype="text"/>
3460                         <field name="staff_alert" reporter:datatype="bool"/>
3461                         <field name="org_depth" reporter:datatype="int"/>
3462                 </fields>
3463                 <links/>
3464         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3465             <actions>
3466                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3467                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3468                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3469                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3470             </actions>
3471         </permacrud>
3472         </class>
3473         <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">
3474                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3475                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3476                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3477                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3478                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3479                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3480                 </fields>
3481                 <links>
3482                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3483                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3484                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3485         </links>
3486         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3487             <actions>
3488                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3489                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3490                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3491                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3492             </actions>
3493         </permacrud>
3494         </class>
3495         <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">
3496                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3497                         <field name="holdable" reporter:datatype="bool"/>
3498                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3499                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3500                         <field name="opac_visible" reporter:datatype="bool"/>
3501             <field name="copy_active" reporter:datatype="bool"/>
3502             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3503                 </fields>
3504                 <links/>
3505         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3506             <actions>
3507                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3508                 <retrieve/>
3509                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3510                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3511             </actions>
3512         </permacrud>
3513         </class>
3514         <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">
3515                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3516                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3517                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3518                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3519                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3520                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3521                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3522                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3523                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3524                 </fields>
3525                 <links>
3526                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3527                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3528                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3529                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3530                 </links>
3531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3532                         <actions>
3533                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3534                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3535                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3536                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3537                         </actions>
3538                 </permacrud>
3539         </class>
3540         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3541                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3542                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3543                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3544                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3545                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3546                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3547                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3548                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3549                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3550                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3551                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3552                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3553                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3554                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3555                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3556                 </fields>
3557                 <links>
3558                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3559                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3560                 </links>
3561         </class>
3562         <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">
3563                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3564                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3565                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3566                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3567                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3568                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3569                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3570                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3571                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3572                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3573                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3574                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3575                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3576                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3577                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3578                 </fields>
3579                 <links>
3580                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3581                 </links>
3582                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3583                         <actions>
3584                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3585                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3586                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3587                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3588                         </actions>
3589                 </permacrud>
3590         </class>
3591
3592
3593         <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">
3594                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3595                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3596                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3597                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3598                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3599                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3600                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3601                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3602                 </fields>
3603                 <links>
3604                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3605                 </links>
3606         </class>
3607
3608         <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">
3609                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3610                         <field name="call_number" />
3611                         <field name="create_date" reporter:datatype="timestamp"/>
3612                         <field name="creator" reporter:datatype="link"/>
3613                         <field name="id" reporter:datatype="id" />
3614                         <field name="pub" reporter:datatype="bool"/>
3615                         <field name="title"  reporter:datatype="text"/>
3616                         <field name="value"  reporter:datatype="text"/>
3617                 </fields>
3618                 <links>
3619                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3620                 </links>
3621         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3622             <actions>
3623                 <create permission="CREATE_VOLUME_NOTE">
3624                     <context link="call_number" field="owning_lib"/>
3625                 </create>
3626                 <retrieve permission="VIEW_VOLUME_NOTES">
3627                     <context link="call_number" field="owning_lib"/>
3628                 </retrieve>
3629                 <update permission="UPDATE_VOLUME_NOTE">
3630                     <context link="call_number" field="owning_lib"/>
3631                 </update>
3632                 <delete permission="DELETE_VOLUME_NOTE">
3633                     <context link="call_number" field="owning_lib"/>
3634                 </delete>
3635             </actions>
3636         </permacrud>
3637         </class>
3638         <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">
3639                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3640                         <field name="create_date" reporter:datatype="timestamp"/>
3641                         <field name="creator" reporter:datatype="link"/>
3642                         <field name="edit_date" reporter:datatype="timestamp"/>
3643                         <field name="editor" reporter:datatype="link"/>
3644                         <field name="id" reporter:datatype="id" />
3645                         <field name="record" reporter:datatype="link"/>
3646                         <field name="value" reporter:datatype="text"/>
3647                 </fields>
3648                 <links>
3649                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3650                 </links>
3651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3652             <actions>
3653                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3654                 <retrieve/>
3655                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3656                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3657             </actions>
3658         </permacrud>
3659         </class>
3660         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3661         <oils_persist:source_definition>
3662 SELECT  usr,
3663         SUM(
3664             CASE
3665                 WHEN (
3666                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3667                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3668                 ) THEN 1
3669                 ELSE 0
3670             END
3671         ) AS out,
3672
3673         SUM(
3674             CASE
3675                 WHEN (
3676                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3677                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3678                 ) THEN 1
3679                 ELSE 0
3680             END
3681         ) AS overdue,
3682
3683         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3684         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3685         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3686   FROM  action.circulation
3687   WHERE checkin_time IS NULL
3688   GROUP BY 1
3689         </oils_persist:source_definition>
3690         <fields oils_persist:primary="usr">
3691             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3692             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3693             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3694             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3695             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3696             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3697         </fields>
3698         <links>
3699             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3700         </links>
3701         </class>
3702         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3703         <oils_persist:source_definition>
3704 SELECT  usr,
3705         STRING_AGG(
3706             CASE
3707                 WHEN (
3708                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3709                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3710                 ) THEN id::TEXT
3711                 ELSE '0'
3712             END
3713         ,',') AS out,
3714
3715         STRING_AGG(
3716             CASE
3717                 WHEN (
3718                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3719                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3720                 ) THEN id::TEXT
3721                 ELSE '0'
3722             END
3723         ,',') AS overdue,
3724
3725         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
3726         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id::TEXT ELSE '0' END,',') AS claims_returned,
3727         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
3728   FROM  action.circulation
3729   WHERE checkin_time IS NULL
3730   GROUP BY 1
3731         </oils_persist:source_definition>
3732         <fields oils_persist:primary="usr">
3733             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3734             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3735             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3736             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3737             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3738             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3739         </fields>
3740         <links>
3741             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3742         </links>
3743         </class>
3744         <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">
3745                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3746                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3747                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3748                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3749                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3750                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3751                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3752                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3753                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3754                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3755                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3756                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3757                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3758                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3759                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3760                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3761                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3762                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3763                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3764                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3765                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3766                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3767                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3768                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3769                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3770                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3771                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3772                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3773                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3774                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3775                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3776                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3777                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3778                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3779                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3780                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3781                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3782                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3783                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3784                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3785                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3786                 </fields>
3787                 <links>
3788                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3789                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3790                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3791                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3792                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3793                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3794                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3795                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3796                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3797                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3798                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3799                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3800                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3801                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3802                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3803                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3804                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3805                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3806                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3807                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3808                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3809                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3810                 </links>
3811                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3812                         <actions>
3813                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3814                         </actions>
3815                 </permacrud>
3816         </class>
3817         <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">
3818                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3819                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3820                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3821                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3822                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3823                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3824                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3825                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3826                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3827                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3828                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3829                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3830                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3831                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3832                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3833                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3834                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3835                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3836                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3837                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3838                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3839                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3840                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3841                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3842                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3843                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3844                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3845                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3846                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3847                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3848                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3849                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3850                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3851                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3852                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3853                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3854                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3855                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3856                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3857                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3858                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3859                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3860                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3861                 </fields>
3862                 <links>
3863                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3864                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3865                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3866                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3867                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3868                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3869                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3870                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3871                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3872                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3873                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3874                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3875                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3876                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3877                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3878                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3879                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3880                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3881                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3882                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3883                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3884                 </links>
3885         </class>
3886         <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">
3887                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3888                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3889                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3890                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3891                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3892                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3893                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3894                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3895                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3896                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3897                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3898                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3899                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3900                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3901                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3902                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3903                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3904                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3905                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3906                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3907                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3908                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3909                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3910                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3911                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3912                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3913                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3914                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3915                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3916                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3917                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3918                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3919                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3920                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3921                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3922                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3923                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3924                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3925                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3926                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3927                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3928                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3929                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3930                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3931                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3932                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3933                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3934                 </fields>
3935                 <links>
3936                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3937                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3938                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3939                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3940                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3941                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3942                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3943                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3944                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3945                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3946                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3947                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3948                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3949                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3950                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3951                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3952                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3953                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3954                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3955                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3956                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3957                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3958                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3959                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3960                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3961                 </links>
3962         </class>
3963
3964         <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">
3965                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3966                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3967                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3968                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3969                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3970                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3971                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3972                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3973                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3974                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3975                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3976                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3977                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3978                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3979                 </fields>
3980                 <links>
3981                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3982                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3983                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3984                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3985                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3986                 </links>
3987                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3988                         <actions>
3989                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3990                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3991                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3992                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3993                         </actions>
3994                 </permacrud>
3995         </class>
3996
3997         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3998                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3999                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4000                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4001                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4002                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4003                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4004                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4005                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4006                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4007                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4008                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4009                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4010                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4011                 </fields>
4012                 <links>
4013                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4014                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4015                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4016                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4017                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4018                 </links>
4019                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4020                         <actions>
4021                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4022                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4023                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4024                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4025                         </actions>
4026                 </permacrud>
4027         </class>
4028         
4029         <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">
4030                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4031                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4032                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4033                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4034                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4035                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4036                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4037                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4038                 </fields>
4039                 <links>
4040                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4041                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4042                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4043                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4044                 </links>
4045                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4046                         <actions>
4047                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4048                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4049                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4050                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4051                         </actions>
4052                 </permacrud>
4053         </class>
4054         
4055         <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">
4056                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4057                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4058                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4059                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4060                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4061                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4062                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4063                 </fields>
4064                 <links>
4065                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4066                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4067                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4068                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4069                 </links>
4070                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4071                         <actions>
4072                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4073                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4074                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4075                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4076                         </actions>
4077                 </permacrud>
4078         </class>
4079         
4080         <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">
4081                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4082                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4083                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4084                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4085                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4086                 </fields>
4087                 <links>
4088                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4089                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4090                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4091                 </links>
4092                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4093                         <actions>
4094                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4095                     <context link="resource" field="owner" />
4096                 </create>
4097                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4098                     <context link="resource" field="owner" />
4099                 </retrieve>
4100                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4101                     <context link="resource" field="owner" />
4102                 </update>
4103                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4104                     <context link="resource" field="owner" />
4105                 </delete>
4106                         </actions>
4107                 </permacrud>
4108         </class>
4109         
4110         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4111                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4112                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4113                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4114                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4115                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4116                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4117                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4118                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4119                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4120                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4121                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4122                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4123                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4124                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4125                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4126                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4127                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4128                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4129                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4130                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4131                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4132                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4133                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4134                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4135                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4136                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4137                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4138                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4139                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4140                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4141                 </fields>
4142                 <links>
4143                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4144                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4145                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4146                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4147                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4148                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4149                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4150                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4151                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4152                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4153                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4154                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4155                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4156                 </links>
4157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4158                         <actions>
4159                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4160                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4161                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4162                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4163                         </actions>
4164                 </permacrud>
4165         </class>
4166         
4167         <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">
4168                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4169                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4170                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4171                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4172                 </fields>
4173                 <links>
4174                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4175                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4176                 </links>
4177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4178                         <actions>
4179                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4180                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4181                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4182                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4183                         </actions>
4184                 </permacrud>
4185         </class>
4186
4187         <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">
4188                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4189                         <field name="bucket" reporter:datatype="link"/>
4190                         <field name="id" reporter:datatype="id" />
4191                         <field name="target_call_number" reporter:datatype="link" />
4192                         <field name="create_time" reporter:datatype="timestamp" />
4193                         <field name="pos" reporter:datatype="int" />
4194                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4195                 </fields>
4196                 <links>
4197                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4198                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4199             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4200                 </links>
4201         </class>
4202         <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">
4203                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4204                         <field name="id" reporter:datatype="id" />
4205                         <field name="item" reporter:datatype="link"/>
4206                         <field name="note" reporter:datatype="text" />
4207                 </fields>
4208                 <links>
4209                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4210                 </links>
4211         </class>
4212         <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">
4213                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4214                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4215                         <field name="btype" reporter:datatype="text"/>
4216                         <field name="id" reporter:datatype="id" />
4217                         <field name="name" reporter:datatype="text"/>
4218                         <field name="description" reporter:datatype="text"/>
4219                         <field name="owner" reporter:datatype="link"/>
4220                         <field name="pub" reporter:datatype="bool"/>
4221                         <field name="create_time" reporter:datatype="timestamp" />
4222                 </fields>
4223                 <links>
4224                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4225                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4226                 </links>
4227         </class>
4228         <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">
4229                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4230                         <field name="id" reporter:datatype="id" />
4231                         <field name="bucket" reporter:datatype="link"/>
4232                         <field name="note" reporter:datatype="text" />
4233                 </fields>
4234                 <links>
4235                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4236                 </links>
4237         </class>
4238         <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">
4239                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4240                         <field name="hold" reporter:datatype="link"/>
4241                         <field name="id" reporter:datatype="id" />
4242                         <field name="target_copy" reporter:datatype="link"/>
4243                         <field name="proximity" reporter:datatype="number"/>
4244                 </fields>
4245                 <links>
4246                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4247                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4248                 </links>
4249         </class>
4250         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4251                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4252                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4253                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4254                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4255                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4256                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4257                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4258                 </fields>
4259                 <links>
4260                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4261                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4262                 </links>
4263         </class>
4264         <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">
4265                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4266                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4267                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4268                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4269                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4270                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4271                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4272                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4273                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4274                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4275                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4276                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4277                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4278                 </fields>
4279                 <links>
4280                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4281                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4282                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4283                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4284                 </links>
4285         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4286             <actions>
4287                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4288                 <retrieve/>
4289                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4290                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4291             </actions>
4292         </permacrud>
4293         </class>
4294         <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">
4295                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4296                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4297                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4298                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4299                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4300             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4301             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4302             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4303                 </fields>
4304                 <links>
4305                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4306                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4307                 </links>
4308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4309             <actions>
4310                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4311                 <retrieve/>
4312                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4313                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4314             </actions>
4315         </permacrud>
4316         </class>
4317         <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">
4318                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4319                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4320             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4321             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4322                 </fields>
4323                 <links>
4324                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4325                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4326                 </links>
4327         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4328             <actions>
4329                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4330                                         <context link="lgroup" field="owner" />
4331                 </create>
4332                 <retrieve/>
4333                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4334                                         <context link="lgroup" field="owner" />
4335                 </update>
4336                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4337                                         <context link="lgroup" field="owner" />
4338                 </delete>
4339             </actions>
4340         </permacrud>
4341         </class>
4342
4343     <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">
4344         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4345             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4346             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4347             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4348             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4349         </fields>
4350         <links>
4351             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4352             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4353         </links>
4354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4355             <actions>
4356                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4357                 <retrieve/>
4358                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4359                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4360             </actions>
4361         </permacrud>
4362     </class>
4363
4364         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4365                 <fields>
4366                         <field name="sre_id" oils_persist:virtual="true" />
4367                         <field name="location" oils_persist:virtual="true" />
4368                         <field name="owning_lib" oils_persist:virtual="true" />
4369                         <field name="basic_holdings" oils_persist:virtual="true" />
4370                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4371                         <field name="supplement_holdings" oils_persist:virtual="true" />
4372                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4373                         <field name="index_holdings" oils_persist:virtual="true" />
4374                         <field name="index_holdings_add" oils_persist:virtual="true" />
4375                         <field name="online" oils_persist:virtual="true" />
4376                         <field name="missing" oils_persist:virtual="true" />
4377                         <field name="incomplete" oils_persist:virtual="true" />
4378                 </fields>
4379         </class>
4380
4381         <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">
4382                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4383                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4384                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4385                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4386                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4387                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4388                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4389                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4390                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4391                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4392                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4393                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4394                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4395                 </fields>
4396                 <links>
4397                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4398                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4399                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4400                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4401                 </links>
4402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4403                         <actions>
4404                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4405                                 <retrieve/>
4406                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4407                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4408                         </actions>
4409                 </permacrud>
4410         </class>
4411
4412         <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">
4413                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4414                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4415                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4416                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4417                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4418                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4419                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4420                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4421                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4422                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4423                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4424                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4425                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4426                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4427                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4428                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4429                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4430                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4431                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4432                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4433                 </fields>
4434                 <links>
4435                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4436                 </links>
4437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4438                         <actions>
4439                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4440                                         <context link="subscription" field="owning_lib" />
4441                                 </create>
4442                                 <retrieve />
4443                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4444                                         <context link="subscription" field="owning_lib" />
4445                                 </update>
4446                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4447                                         <context link="subscription" field="owning_lib" />
4448                                 </delete>
4449                         </actions>
4450                 </permacrud>
4451         </class>
4452
4453         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4454                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4455                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4456                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4457                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4458                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4459                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4460                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4461                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4462                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4463                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4464                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4465                 </fields>
4466                 <links>
4467                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4468                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4469                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4470                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4471                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4472                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4473                 </links>
4474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4475                         <actions>
4476                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4477                                 <retrieve />
4478                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4479                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4480                         </actions>
4481                 </permacrud>
4482         </class>
4483
4484         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4485                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4486                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4487                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4488                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4489                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4490                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4491                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4492                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4493                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4494                 </fields>
4495                 <links>
4496                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4497                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4498                 </links>
4499         </class>
4500
4501         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4502                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4503                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4504                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4505                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4506                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4507                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4508                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4509                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4510                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4511                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4512                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4513                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4514                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4515                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4516                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4517                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4518                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4519                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4520                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4521                 </fields>
4522                 <links>
4523                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4524                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4525                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4526                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4527                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4528                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4529                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4530                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4531                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4532                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4533                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4534                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4535                 </links>
4536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4537                         <actions>
4538                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4539                                 <retrieve />
4540                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4541                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4542                         </actions>
4543                 </permacrud>
4544         </class>
4545
4546         <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">
4547                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4548                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4549                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4550                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4551                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4552                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4553                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4554                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4555                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4556                 </fields>
4557                 <links>
4558                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4559                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4560                 </links>
4561                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4562                         <actions>
4563                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4564                                         <context link="distribution" field="holding_lib" />
4565                                 </create>
4566                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4567                                         <context link="distribution" field="holding_lib" />
4568                                 </retrieve>
4569                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4570                                         <context link="distribution" field="holding_lib" />
4571                                 </update>
4572                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4573                                         <context link="distribution" field="holding_lib" />
4574                                 </delete>
4575                         </actions>
4576                 </permacrud>
4577         </class>
4578
4579         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4580                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4581                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4582                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4583                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4584                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4585                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4586                 </fields>
4587                 <links>
4588                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4589                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4590                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4591                 </links>
4592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4593                         <actions>
4594                                 <create permission="ADMIN_SERIAL_STREAM">
4595                                         <context link="distribution" field="holding_lib" />
4596                                 </create>
4597                                 <retrieve />
4598                                 <update permission="ADMIN_SERIAL_STREAM">
4599                                         <context link="distribution" field="holding_lib" />
4600                                 </update>
4601                                 <delete permission="ADMIN_SERIAL_STREAM">
4602                                         <context link="distribution" field="holding_lib" />
4603                                 </delete>
4604                         </actions>
4605                 </permacrud>
4606         </class>
4607
4608         <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">
4609                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4610                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4611                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4612                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4613                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4614                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4615                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4616                 </fields>
4617                 <links>
4618                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4619                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4620                 </links>
4621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4622                         <actions>
4623                                 <create permission="ADMIN_SERIAL_STREAM">
4624                                         <context link="stream" jump="distribution" field="holding_lib" />
4625                                 </create>
4626                                 <retrieve permission="RECEIVE_SERIAL">
4627                                         <context link="stream" jump="distribution" field="holding_lib" />
4628                                 </retrieve>
4629                                 <update permission="ADMIN_SERIAL_STREAM">
4630                                         <context link="stream" jump="distribution" field="holding_lib" />
4631                                 </update>
4632                                 <delete permission="ADMIN_SERIAL_STREAM">
4633                                         <context link="stream" jump="distribution" field="holding_lib" />
4634                                 </delete>
4635                         </actions>
4636                 </permacrud>
4637         </class>
4638
4639         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4640                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4641                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4642                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4643                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4644                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4645                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4646                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4647                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4648                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4649                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4650                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4651                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4652                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4653                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4654                 </fields>
4655                 <links>
4656                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4657                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4658                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4659                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4660                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4661                 </links>
4662                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4663                         <actions>
4664                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4665                                         <context link="subscription" field="owning_lib" />
4666                                 </create>
4667                                 <retrieve/>
4668                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4669                                         <context link="subscription" field="owning_lib" />
4670                                 </update>
4671                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4672                                         <context link="subscription" field="owning_lib" />
4673                                 </delete>
4674                         </actions>
4675                 </permacrud>
4676         </class>
4677
4678         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4679                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4680                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4681                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4682                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4683                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4684                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4685                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4686                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4687                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4688                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4689                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4690                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4691                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4692                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4693                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4694                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4695                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4696                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4697                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4698                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4699                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4700                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4701                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4702                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4703                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4704                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4705                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4706                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4707                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4708                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4709                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4710                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4711                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
4712                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4713                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4714                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4715                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4716                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4717                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4718                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4719                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4720                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4721                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4722                 </fields>
4723                 <links>
4724                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4725                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4726                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4727                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4728                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4729                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4730                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4731                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4732                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4733                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4734                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4735                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4736                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4737                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4738                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
4739                 </links>
4740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4741                         <actions>
4742                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4743                                 <retrieve/>
4744                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4745                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4746                         </actions>
4747                 </permacrud>
4748         </class>
4749
4750         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4751                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4752                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4753                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4754                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4755                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4756                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4757                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4758                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4759                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4760                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4761                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4762                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4763                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4764                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4765                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4766                 </fields>
4767                 <links>
4768                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4769                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4770                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4771                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4772                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4773                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4774                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4775                 </links>
4776                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4777                         <actions>
4778                                 <create permission="ADMIN_SERIAL_ITEM">
4779                                         <context link="stream" jump="distribution" field="holding_lib" />
4780                                 </create>
4781                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4782                                         <context link="stream" jump="distribution" field="holding_lib" />
4783                                 </retrieve>
4784                                 <update permission="ADMIN_SERIAL_ITEM">
4785                                         <context link="stream" jump="distribution" field="holding_lib" />
4786                                 </update>
4787                                 <delete permission="ADMIN_SERIAL_ITEM">
4788                                         <context link="stream" jump="distribution" field="holding_lib" />
4789                                 </delete>
4790                         </actions>
4791                 </permacrud>
4792         </class>
4793
4794         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4795                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4796                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4797                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4798                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4799                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4800                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4801                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4802                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4803                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4804                 </fields>
4805                 <links>
4806                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4807                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4808                 </links>
4809                 <!-- Not available via PCRUD at this time -->
4810         </class>
4811         <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">
4812                 <fields>
4813                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4814                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4815                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4816                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4817                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4818                 </fields>
4819                 <links>
4820                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4821                 </links>
4822         </class>
4823         <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">
4824                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4825                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4826                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4827                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4828                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4829                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4830                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4831                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4832                 </fields>
4833                 <links>
4834                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4835                 </links>
4836         </class>
4837         <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">
4838                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4839                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4840                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4841                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4842                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4843                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4844                 </fields>
4845                 <links>
4846                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4847                 </links>
4848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4849                         <actions>
4850                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4851                                         <context link="distribution" field="holding_lib" />
4852                                 </create>
4853                                 <retrieve/>
4854                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4855                                         <context link="distribution" field="holding_lib" />
4856                                 </update>
4857                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4858                                         <context link="distribution" field="holding_lib" />
4859                                 </delete>
4860                         </actions>
4861                 </permacrud>
4862         </class>
4863
4864         <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">
4865                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4866                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4867                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4868                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4869                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4870                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4871                 </fields>
4872                 <links>
4873                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4874                 </links>
4875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4876                         <actions>
4877                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4878                                         <context link="distribution" field="holding_lib" />
4879                                 </create>
4880                                 <retrieve/>
4881                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4882                                         <context link="distribution" field="holding_lib" />
4883                                 </update>
4884                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4885                                         <context link="distribution" field="holding_lib" />
4886                                 </delete>
4887                         </actions>
4888                 </permacrud>
4889         </class>
4890
4891         <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">
4892                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4893                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4894                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4895                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4896                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4897                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4898                 </fields>
4899                 <links>
4900                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4901                 </links>
4902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4903                         <actions>
4904                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4905                                         <context link="distribution" field="holding_lib" />
4906                                 </create>
4907                                 <retrieve/>
4908                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4909                                         <context link="distribution" field="holding_lib" />
4910                                 </update>
4911                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4912                                         <context link="distribution" field="holding_lib" />
4913                                 </delete>
4914                         </actions>
4915                 </permacrud>
4916         </class>
4917
4918         <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">
4919                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4920                         <field name="id" reporter:datatype="id" />
4921                         <field name="owning_copy" reporter:datatype="link"/>
4922                         <field name="stat_cat" reporter:datatype="link"/>
4923                         <field name="stat_cat_entry" reporter:datatype="link"/>
4924                 </fields>
4925                 <links>
4926                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4927                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4928                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4929                 </links>
4930         </class>
4931         <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">
4932                 <fields oils_persist:primary="code">
4933                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4934                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4935                 </fields>
4936                 <links/>
4937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4938             <actions>
4939                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4940                 <retrieve/>
4941                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4942                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4943             </actions>
4944         </permacrud>
4945         </class>
4946         <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">
4947                 <fields oils_persist:primary="code">
4948                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4949                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4950                 </fields>
4951                 <links/>
4952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4953             <actions>
4954                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4955                 <retrieve/>
4956                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4957                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4958             </actions>
4959         </permacrud>
4960         </class>
4961         <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">
4962                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4963                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4964                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4965                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4966                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4967                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4968                 </fields>
4969                 <links>
4970             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4971         </links>
4972         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4973             <actions>
4974                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4975                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4976                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4977                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4978             </actions>
4979         </permacrud>
4980         </class>
4981         <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">
4982                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4983                         <field name="id" reporter:datatype="id" />
4984                         <field name="name" reporter:datatype="text"/>
4985                 </fields>
4986                 <links/>
4987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4988             <actions>
4989                 <create permission="CREATE_LASSO" global_required="true"/>
4990                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4991                 <update permission="UPDATE_LASSO" global_required="true"/>
4992                 <delete permission="DELETE_LASSO" global_required="true"/>
4993             </actions>
4994         </permacrud>
4995         </class>
4996         <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">
4997                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4998                         <field name="id" reporter:datatype="id" />
4999                         <field name="lasso" reporter:datatype="link"/>
5000                         <field name="org_unit" reporter:datatype="org_unit"/>
5001                 </fields>
5002                 <links>
5003                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5004                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5005                 </links>
5006         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5007             <actions>
5008                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5009                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5010                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5011                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5012             </actions>
5013         </permacrud>
5014         </class>
5015         <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">
5016                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5017                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5018                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5019                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5020                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5021                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5022                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5023                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5024                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5025                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5026                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5027                 </fields>
5028                 <links>
5029                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5030                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5031                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5032                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5033                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5034                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5035                 </links>
5036         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5037             <actions>
5038                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5039                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5040                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5041                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5042             </actions>
5043         </permacrud>
5044         </class>
5045         <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">
5046                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5047                         <field name="id" reporter:datatype="id" />
5048                         <field name="from_org" reporter:datatype="org_unit"/>
5049                         <field name="to_org" reporter:datatype="org_unit"/>
5050                         <field name="prox" reporter:datatype="int" />
5051                 </fields>
5052                 <links>
5053                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5054                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5055                 </links>
5056         </class>
5057         <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">
5058                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5059                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5060                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5061                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5062                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5063                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5064                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5065                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5066                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5067                 </fields>
5068                 <links/>
5069         </class>
5070         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5071                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5072                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5073                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5074                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5075                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5076                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5077                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5078                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5079                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5080                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5081                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5082                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5083                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5084                 </fields>
5085                 <links>
5086                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5087                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5088                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5089                 </links>
5090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5091             <actions>
5092                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5093                 <retrieve/>
5094                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5095                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5096             </actions>
5097         </permacrud>
5098         </class>
5099         <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">
5100                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5101                         <field name="address_type"  reporter:datatype="text"/>
5102                         <field name="city"  reporter:datatype="text"/>
5103                         <field name="country"  reporter:datatype="text"/>
5104                         <field name="county"  reporter:datatype="text"/>
5105                         <field name="id" reporter:datatype="id" />
5106                         <field name="org_unit" reporter:datatype="org_unit"/>
5107                         <field name="post_code"  reporter:datatype="text"/>
5108                         <field name="state"  reporter:datatype="text"/>
5109                         <field name="street1"  reporter:datatype="text"/>
5110                         <field name="street2"  reporter:datatype="text"/>
5111                         <field name="valid" reporter:datatype="bool"/>
5112                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5113                 </fields>
5114                 <links>
5115                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5116                 </links>
5117         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5118             <actions>
5119                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5120                 <retrieve/>
5121                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5122                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5123             </actions>
5124         </permacrud>
5125         </class>
5126         <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">
5127                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5128                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5129                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5130                         <field name="query_text" reporter:datatype="text"/>
5131                 </fields>
5132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5133             <actions>
5134                 <retrieve/>
5135             </actions>
5136         </permacrud>
5137         </class>
5138
5139         <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">
5140                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5141                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5142                         <field name="owner" reporter:datatype="org_unit"/>
5143                         <field name="code" reporter:datatype="text"/>
5144                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5145                         <field name="create_date" reporter:datatype="timestamp"/>
5146                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5147                 </fields>
5148                 <links>
5149                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5150                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5151                 </links>
5152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5153             <actions>
5154                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5155                 <retrieve/>
5156                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5157                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5158             </actions>
5159         </permacrud>
5160         </class>
5161         <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">
5162                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5163                         <field name="id" reporter:datatype="id"/>
5164                         <field name="grp" reporter:datatype="link"/>
5165                         <field name="pos" reporter:datatype="int"/>
5166                         <field name="query" reporter:datatype="link"/>
5167                 </fields>
5168                 <links>
5169                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5170                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5171                 </links>
5172         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5173             <actions>
5174                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5175                     <context link="grp" field="owner"/>
5176                 </create>
5177                 <retrieve/>
5178                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5179                     <context link="grp" field="owner"/>
5180                 </update>
5181                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5182                     <context link="grp" field="owner"/>
5183                 </delete>
5184             </actions>
5185         </permacrud>
5186         </class>
5187
5188         <!-- A note: Please update alhr and ahopl when updating ahr -->
5189         <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">
5190                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5191                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5192                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5193                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5194                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5195                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5196                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5197                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5198                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5199                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5200                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5201                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5202                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5203                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5204                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5205                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5206                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5207                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5208                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5209                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5210                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5211                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5212                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5213                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5214                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5215                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5216                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5217                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5218                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5219                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5220                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5221                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5222                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5223                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5224                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5225                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5226                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5227                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5228                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5229                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5230                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5231                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5232                 </fields>
5233                 <links>
5234                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5235                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5236                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5237                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5238                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5239                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5240                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5241                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5242                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5243                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5244                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5245                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5246                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5247                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5248                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5249                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5250                 </links>
5251                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5252                         <actions>
5253                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5254                         </actions>
5255                 </permacrud>
5256         </class>
5257         <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">
5258                 <oils_persist:source_definition><![CDATA[
5259                 SELECT
5260                         ahr.*,
5261                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5262                                 copy_location_order_position,
5263                         CASE WHEN au.alias IS NOT NULL THEN
5264                                 au.alias
5265                         ELSE
5266                                 au.first_given_name
5267                         END AS usr_alias_or_first_given_name,
5268                         au.first_given_name AS usr_first_given_name,
5269                         au.second_given_name AS usr_second_given_name,
5270                         au.family_name AS usr_family_name,
5271                         au.prefix AS usr_prefix,
5272                         au.suffix AS usr_suffix,
5273                         au.alias AS usr_alias,
5274                         CASE WHEN au.alias IS NOT NULL THEN
5275                                 au.alias
5276                         ELSE
5277                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5278                                         COALESCE(au.family_name, ''),
5279                                         COALESCE(au.suffix, ''),
5280                                         ', ',
5281                                         COALESCE(au.prefix, ''),
5282                                         COALESCE(au.first_given_name, ''),
5283                                         COALESCE(au.second_given_name, '')
5284                                 ], ' '), E'\\s+,', ',')
5285                         END AS usr_alias_or_display_name,
5286                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5287                                 COALESCE(au.family_name, ''),
5288                                 COALESCE(au.suffix, ''),
5289                                 ', ',
5290                                 COALESCE(au.prefix, ''),
5291                                 COALESCE(au.first_given_name, ''),
5292                                 COALESCE(au.second_given_name, '')
5293                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5294                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5295                                 AS call_number_label,
5296                         siss.label AS issuance_label,
5297                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5298                         ahcm_1.copy_count AS potential_copies
5299                 FROM action.hold_request ahr
5300                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5301                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5302                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5303                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5304                 JOIN actor.usr au ON (au.id = ahr.usr)
5305                 JOIN (
5306                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5307                         FROM asset.copy_location
5308                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5309                 LEFT JOIN actor.usr_standing_penalty ausp 
5310                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5311                 LEFT JOIN config.standing_penalty csp
5312                         ON (
5313                                 csp.id = ausp.standing_penalty AND 
5314                                 csp.block_list LIKE '%CAPTURE%' AND (
5315                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5316                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5317                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5318                                         )
5319                                 )
5320                         )
5321                 JOIN (
5322                         SELECT COUNT(target_copy) AS copy_count, hold
5323                         FROM action.hold_copy_map
5324                         GROUP BY 2
5325                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5326                 LEFT JOIN serial.issuance siss
5327                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5328                 LEFT JOIN asset.copy_location_order acplo
5329                         ON (acp.location = acplo.location AND
5330                                 acp.circ_lib = acplo.org)
5331                 WHERE
5332                         ahr.capture_time IS NULL AND
5333                         ahr.cancel_time IS NULL AND
5334                         csp.id IS NULL AND
5335                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5336                 ]]></oils_persist:source_definition>
5337                 <fields oils_persist:primary="id">
5338                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5339                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5340                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5341                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5342                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5343                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5344                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5345                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5346                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5347                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5348                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5349                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5350                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5351                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5352                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5353                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5354                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5355                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5356                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5357                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5358                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5359                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5360                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5361                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5362                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5363                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5364                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5365                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5366                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5367                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5368                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5369                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5370                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5371                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5372                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5373                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5374                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5375                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5376                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5377                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5378                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5379                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5380                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5381                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5382                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5383                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5384                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5385                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5386                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5387                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5388                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5389                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5390                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5391                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5392                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5393                 </fields>
5394                 <links>
5395                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5396                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5397                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5398                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5399                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5400                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5401                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5402                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5403                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5404                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5405                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5406                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5407                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5408                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5409                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5410                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5411                 </links>
5412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5413                         <actions>
5414                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5415                         </actions>
5416                 </permacrud>
5417         </class>
5418         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5419                 <oils_persist:source_definition>
5420                         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)
5421                 </oils_persist:source_definition>
5422                 <fields oils_persist:primary="id">
5423                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5424                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5425                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5426                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5427                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5428                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5429                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5430                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5431                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5432                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5433                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5434                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5435                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5436                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5437                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5438                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5439                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5440                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5441                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5442                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5443                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5444                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5445                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5446                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5447                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5448                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5449                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5450                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5451                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5452                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5453                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5454                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5455                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5456                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5457                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5458                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5459                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5460                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5461                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5462                 </fields>
5463                 <links>
5464                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5465                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5466                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5467                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5468                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5469                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5470                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5471                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5472                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5473                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5474                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5475                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5476                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5477                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5478                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5479                 </links>
5480         </class>
5481
5482         <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">
5483                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5484                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5485                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5486                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5487                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5488                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5489                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5490                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5491                 </fields>
5492                 <links>
5493                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5494                 </links>
5495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5496                         <actions>
5497                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5498                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5499                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5500                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5501                         </actions>
5502                 </permacrud>
5503         </class>
5504         <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">
5505                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5506                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5507                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5508                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5509                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5510                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5511                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5512                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5513                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5514                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5515                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5516                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5517                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5518                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5519                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5520                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5521                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5522                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5523                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5524                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5525                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5526                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5527                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5528                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5529                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5530                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5531                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5532                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5533                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5534                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5535                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5536                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5537                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5538                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5539                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5540                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5541                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5542                 </fields>
5543                 <links>
5544                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5545                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5546                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5547                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5548                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5549                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5550                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5551                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5552                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5553                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5554                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5555                 </links>
5556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5557                         <actions>
5558                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5559                         </actions>
5560                 </permacrud>
5561         </class>
5562         <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">
5563                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5564                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5565                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5566                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5567                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5568                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5569                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5570                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5571                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5572                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5573                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5574                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5575                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5576                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5577                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5578                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5579                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5580                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5581                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5582                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5583                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5584                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5585                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5586                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5587                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5588                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5589                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5590                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5591                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5592                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5593                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5594                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5595                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5596                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5597                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5598                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5599                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5600                 </fields>
5601                 <links>
5602                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5603                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5604                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5605                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5606                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5607                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5608                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5609                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5610                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5611                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5612                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5613                 </links>
5614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5615                         <actions>
5616                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5617                         </actions>
5618                 </permacrud>
5619         </class>
5620
5621         <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">
5622                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5623                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5624                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5625                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5626                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5627                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5628                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5629                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5630                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5631                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5632                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5633                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5634                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5635                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5636                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5637                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5638                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5639                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5640                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5641                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5642                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5643                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5644                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5645                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5646                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5647                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5648                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5649                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5650                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5651                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5652                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5653                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5654                 </fields>
5655                 <links>
5656                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5657                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5658                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5659                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5660                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5661                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5662                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5663                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5664                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5665                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5666                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5667                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5668                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5669                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5670                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5671                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5672                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5673                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5674                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5675                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5676                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5677                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5678                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5679                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5680                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5681                 </links>
5682         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5683             <actions>
5684                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5685                 <retrieve />
5686                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5687                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5688             </actions>
5689         </permacrud>
5690         </class>
5691         <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">
5692                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5693                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5694                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5695                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5696                 </fields>
5697                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5698                         <actions>
5699                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5700                                 <retrieve/>
5701                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5702                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5703                         </actions>
5704                 </permacrud>
5705         </class>
5706         <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">
5707                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5708                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5709                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5710                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5711                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5712                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5713                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5714                 </fields>
5715                 <links>
5716                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5717                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5718                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5719                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5720                 </links>
5721                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5722                         <actions>
5723                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5724                                 <retrieve/>
5725                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5726                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5727                         </actions>
5728                 </permacrud>
5729         </class>
5730         <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">
5731                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5732                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5733                         <field name="btype" reporter:datatype="text"/>
5734                         <field name="id" reporter:datatype="id" />
5735                         <field name="name"  reporter:datatype="text"/>
5736                         <field name="description" reporter:datatype="text"/>
5737                         <field name="owner" reporter:datatype="link"/>
5738                         <field name="pub" reporter:datatype="bool"/>
5739                         <field name="create_time" reporter:datatype="timestamp" />
5740                 </fields>
5741                 <links>
5742                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5743                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5744                 </links>
5745         </class>
5746         <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">
5747                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5748                         <field name="id" reporter:datatype="id" />
5749                         <field name="bucket" reporter:datatype="link"/>
5750                         <field name="note" reporter:datatype="text" />
5751                 </fields>
5752                 <links>
5753                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5754                 </links>
5755         </class>
5756         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5757                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5758                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5759                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5760                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5761                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5762                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5763                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5764                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5765                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5766                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5767                 </fields>
5768                 <links>
5769                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5770                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5771                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5772                 </links>
5773         </class>
5774         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5775                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5776                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5777                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5778                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5779                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5780                 </fields>
5781                 <links>
5782                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5783                 </links>
5784                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5785                         <actions>
5786                                 <retrieve permission="VIEW_USER">
5787                                         <context link="usr" field="home_ou" />
5788                                 </retrieve>
5789                         </actions>
5790                 </permacrud>
5791         </class>
5792     <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">
5793         <fields oils_persist:primary="field">
5794             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5795             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5796             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5797         </fields>
5798         <links/>
5799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5800             <actions>
5801                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5802                 <retrieve />
5803                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5804                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5805             </actions>
5806         </permacrud>
5807     </class>
5808         <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">
5809                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5810                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5811                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5812                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5813                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5814                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5815                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5816                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5817                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5818                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5819                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5820                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5821                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5822                 </fields>
5823                 <links>
5824                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5825                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5826                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5827                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5828                 </links>
5829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5830             <actions>
5831                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5832                 <retrieve />
5833                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5834                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5835             </actions>
5836         </permacrud>
5837         </class>
5838         <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">
5839                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5840                         <field name="field" reporter:datatype="link"/>
5841                         <field name="id" reporter:datatype="id" />
5842                         <field name="source" reporter:datatype="link"/>
5843                         <field name="value"  reporter:datatype="text"/>
5844                 </fields>
5845                 <links>
5846                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5847                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5848                 </links>
5849         </class>
5850         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5851                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5852                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5853                         <field name="btype" reporter:datatype="text"/>
5854                         <field name="id" reporter:datatype="id" />
5855                         <field name="name"  reporter:datatype="text"/>
5856                         <field name="description" reporter:datatype="text"/>
5857                         <field name="owner" reporter:datatype="link"/>
5858                         <field name="pub" reporter:datatype="bool"/>
5859                         <field name="create_time" reporter:datatype="timestamp" />
5860                 </fields>
5861                 <links>
5862                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5863                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5864                 </links>
5865         </class>
5866         <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">
5867                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5868                         <field name="id" reporter:datatype="id" />
5869                         <field name="bucket" reporter:datatype="link"/>
5870                         <field name="note" reporter:datatype="text" />
5871                 </fields>
5872                 <links>
5873                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5874                 </links>
5875         </class>
5876         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5877                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5878                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5879                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5880                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5881                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5882                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5883                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5884                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5885                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5886                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5887                 </fields>
5888                 <links>
5889                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5890                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5891                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5892                 </links>
5893         </class>
5894         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5895                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5896                         <field name="id" reporter:datatype="id" />
5897                         <field name="ind1" />
5898                         <field name="ind2" />
5899                         <field name="record" />
5900                         <field name="subfield" />
5901                         <field name="tag" />
5902                         <field name="value" />
5903                 </fields>
5904                 <links>
5905                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5906                 </links>
5907         </class>
5908         <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">
5909                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
5910                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5911                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
5912                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
5913                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
5914                 </fields>
5915                 <links>
5916                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
5917                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
5918                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
5919                 </links>
5920         </class>
5921         <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">
5922                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5923                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5924                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5925                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5926                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5927                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5928                 </fields>
5929                 <links>
5930                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5931                 </links>
5932         </class>
5933         <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">
5934                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5935                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5936                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5937                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5938                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5939                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5940                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5941                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5942                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5943                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5944                 </fields>
5945                 <links>
5946                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5947                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5948                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5949                 </links>
5950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5951             <actions>
5952                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5953                 <retrieve/>
5954                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5955                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5956             </actions>
5957         </permacrud>
5958         </class>
5959         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5960                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5961                         <field name="create_date" reporter:datatype="timestamp"/>
5962                         <field name="creator" reporter:datatype="link"/>
5963                         <field name="edit_date" reporter:datatype="timestamp"/>
5964                         <field name="editor" reporter:datatype="link"/>
5965                         <field name="id" reporter:datatype="id" />
5966                         <field name="pub" reporter:datatype="bool"/>
5967                         <field name="record" reporter:datatype="link"/>
5968                         <field name="value"  reporter:datatype="text"/>
5969                 </fields>
5970                 <links>
5971                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5972                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5973                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5974                 </links>
5975         </class>
5976         <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">
5977                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5978                         <field name="balance_owed" reporter:datatype="money" />
5979                         <field name="total_owed" reporter:datatype="money" />
5980                         <field name="total_paid" reporter:datatype="money" />
5981                         <field name="usr" reporter:datatype="link"/>
5982                 </fields>
5983                 <links>
5984                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5985                 </links>
5986         </class>
5987         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5988                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5989                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5990                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5991                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5992                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5993                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5994                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5995                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5996                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5997                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5998                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5999                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6000                 </fields>
6001                 <links>
6002                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6003                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6004                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6005                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6006                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6007                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6008                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6009                 </links>
6010         </class>
6011         <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">
6012                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6013                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6014                         <field name="quality" reporter:datatype="int" />
6015                         <field name="source" reporter:datatype="text"/>
6016                         <field name="transcendant" reporter:datatype="bool"/>
6017                         <field name="can_have_copies" reporter:datatype="bool"/>
6018                 </fields>
6019                 <links/>
6020         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6021             <actions>
6022                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6023                 <retrieve/>
6024                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6025                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6026             </actions>
6027         </permacrud>
6028         </class>
6029         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
6030                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6031                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6032                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6033                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6034                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6035                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6036                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6037                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6038                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6039                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6040                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6041                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6042                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6043                 </fields>
6044                 <links>
6045                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6046                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6047                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6048                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6049                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6050                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6051                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6052                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6053                 </links>
6054         </class>
6055         <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">
6056                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6057                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6058                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6059                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6060                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6061                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6062                 </fields>
6063                 <links>
6064                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6065                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6066                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6067                 </links>
6068         </class>
6069         <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">
6070                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6071                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6072                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6073                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6074                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6075                 </fields>
6076                 <links>
6077                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6078                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6079                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6080                 </links>
6081         </class>
6082         <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">
6083                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6084                         <field name="bucket" reporter:datatype="link"/>
6085                         <field name="id" reporter:datatype="id" />
6086                         <field name="target_user" reporter:datatype="link"/>
6087                         <field name="create_time" reporter:datatype="timestamp" />
6088                         <field name="pos" reporter:datatype="int" />
6089                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6090                 </fields>
6091                 <links>
6092                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6093                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6094             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6095                 </links>
6096         </class>
6097         <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">
6098                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6099                         <field name="id" reporter:datatype="id" />
6100                         <field name="item" reporter:datatype="link"/>
6101                         <field name="note" reporter:datatype="text" />
6102                 </fields>
6103                 <links>
6104                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6105                 </links>
6106         </class>
6107         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6108                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6109                         <field name="balance_owed" reporter:datatype="money" />
6110                         <field name="total_owed" reporter:datatype="money" />
6111                         <field name="total_paid" reporter:datatype="money" />
6112                         <field name="usr" reporter:datatype="link"/>
6113                 </fields>
6114                 <links>
6115                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6116                 </links>
6117         </class>
6118         <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">
6119                 <fields oils_persist:primary="code" oils_persist:sequence="">
6120                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6121                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6122                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6123                 </fields>
6124                 <links/>
6125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6126             <actions>
6127                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6128                 <retrieve/>
6129                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6130                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6131             </actions>
6132         </permacrud>
6133         </class>
6134         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6135                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6136                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6137                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6138                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6139                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6140                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6141                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6142                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6143                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6144                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6145                 </fields>
6146                 <links>
6147                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6148                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6149                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6150                 </links>
6151         </class>
6152         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6153                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6154                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6155                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6156                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6157                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6158                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6159                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6160                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6161                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6162                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6163                 </fields>
6164                 <links>
6165                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6166                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6167                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6168                 </links>
6169         </class>
6170         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6171                 <fields oils_persist:primary="id" oils_persist:sequence="">
6172                         <field name="checkin_lib" reporter:datatype="link"/>
6173                         <field name="checkin_staff" reporter:datatype="link"/>
6174                         <field name="checkin_time" reporter:datatype="timestamp"/>
6175                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6176                         <field name="circ_staff" reporter:datatype="link"/>
6177                         <field name="desk_renewal" reporter:datatype="bool"/>
6178                         <field name="due_date" reporter:datatype="timestamp"/>
6179                         <field name="duration" reporter:datatype="interval"/>
6180                         <field name="duration_rule" reporter:datatype="link"/>
6181                         <field name="fine_interval" reporter:datatype="interval"/>
6182                         <field name="id" reporter:datatype="id" />
6183                         <field name="max_fine" reporter:datatype="money" />
6184                         <field name="max_fine_rule" reporter:datatype="link"/>
6185                         <field name="opac_renewal" reporter:datatype="bool"/>
6186                         <field name="phone_renewal" reporter:datatype="bool"/>
6187                         <field name="recurring_fine" reporter:datatype="money" />
6188                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6189                         <field name="renewal_remaining" reporter:datatype="int" />
6190             <field name="grace_period" reporter:datatype="interval" />
6191                         <field name="stop_fines" reporter:datatype="text"/>
6192                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6193                         <field name="target_copy" reporter:datatype="link"/>
6194                         <field name="usr" reporter:datatype="link"/>
6195                         <field name="xact_finish" reporter:datatype="timestamp" />
6196                         <field name="xact_start" reporter:datatype="timestamp" />
6197                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6198                 </fields>
6199                 <links>
6200                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6201                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6202                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6203                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6204                 </links>
6205         </class>
6206         <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">
6207                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6208                         <field name="field" reporter:datatype="link"/>
6209                         <field name="id" reporter:datatype="id" />
6210                         <field name="source" reporter:datatype="link"/>
6211                         <field name="value" reporter:datatype="text"/>
6212                 </fields>
6213                 <links>
6214                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6215                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6216                 </links>
6217         </class>
6218         <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">
6219                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6220                         <field name="high" reporter:datatype="money" />
6221                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6222                         <field name="low" reporter:datatype="money" />
6223                         <field name="name" reporter:datatype="text"/>
6224                         <field name="normal" reporter:datatype="money" />
6225                         <field name="recurrence_interval" reporter:datatype="interval"/>
6226             <field name="grace_period" reporter:datatype="interval" />
6227                 </fields>
6228                 <links/>
6229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6230             <actions>
6231                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6232                 <retrieve/>
6233                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6234                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6235             </actions>
6236         </permacrud>
6237         </class>
6238         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6239                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6240                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6241                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6242                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6243                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6244                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6245                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6246                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6247                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6248                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6249                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6250                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6251                 </fields>
6252                 <links>
6253                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6254                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6255                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6256                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6257                 </links>
6258         </class>
6259         <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">
6260                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6261                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6262                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6263                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6264                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6265                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6266                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6267                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6268                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6269                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6270                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6271                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6272                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6273                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6274                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6275                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6276                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6277                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6278                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6279                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6280                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6281                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6282                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6283                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6284                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6285                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6286                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6287                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6288                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6289                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6290                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6291                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6292                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6293                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6294                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6295                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6296                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6297                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6298                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6299                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6300                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6301                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6302                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6303                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6304                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6305                 </fields>
6306                 <links>
6307                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6308                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6309                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6310                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6311                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6312                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6313                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6314                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6315                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6316                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6317                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6318                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6319                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6320                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6321                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6322                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6323                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6324                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6325                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6326                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6327                 </links>
6328         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6329             <actions>
6330                 <create permission="CREATE_COPY">
6331                     <context link="call_number" field="owning_lib"/>
6332                 </create>
6333                 <retrieve/>
6334                 <update permission="UPDATE_COPY">
6335                     <context link="call_number" field="owning_lib"/>
6336                 </update>
6337                 <delete permission="DELETE_COPY">
6338                     <context link="call_number" field="owning_lib"/>
6339                 </delete>
6340             </actions>
6341         </permacrud>
6342         </class>
6343
6344         <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">
6345                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6346                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6347                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6348                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6349                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6350                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6351                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6352                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6353                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6354                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6355                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6356                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6357                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6358                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6359                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6360                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6361                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6362                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6363                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6364                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6365                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6366                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6367                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6368                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6369                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6370                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6371                 </fields>
6372                 <links>
6373                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6374                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6375                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6376                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6377                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6378                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6379                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6380                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6381                 </links>
6382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6383                         <actions>
6384                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6385                                 <retrieve />
6386                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6387                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6388                         </actions>
6389                 </permacrud>
6390         </class>
6391
6392         <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">
6393                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6394                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6395                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6396                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6397                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6398                 </fields>
6399                 <links/>
6400         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6401             <actions>
6402                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6403                 <retrieve/>
6404                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6405                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6406             </actions>
6407         </permacrud>
6408         </class>
6409         <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">
6410                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6411                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6412                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6413                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6414                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6415                 </fields>
6416                 <links/>
6417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6418             <actions>
6419                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6420                 <retrieve/>
6421                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6422                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6423             </actions>
6424         </permacrud>
6425         </class>
6426         <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">
6427                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6428                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6429                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6430                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6431                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6432                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6433                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6434                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6435                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6436                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6437                 </fields>
6438                 <links>
6439                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6440                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6441                 </links>
6442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6443             <actions>
6444                 <create permission="CREATE_PERM" global_required="true"/>
6445                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6446                 <update permission="UPDATE_PERM" global_required="true"/>
6447                 <delete permission="DELETE_PERM" global_required="true"/>
6448             </actions>
6449         </permacrud>
6450         </class>
6451         <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">
6452                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6453                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6454                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6455                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6456                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6457                 </fields>
6458                 <links>
6459                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6460                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6461                 </links>
6462         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6463             <actions>
6464                 <create permission="ADMIN_SURVEY">
6465                     <context link="question" jump="survey" field="owner"/>
6466                 </create>
6467                 <retrieve/>
6468                 <update permission="ADMIN_SURVEY">
6469                     <context link="question" jump="survey" field="owner"/>
6470                 </update>
6471                 <delete permission="ADMIN_SURVEY">
6472                     <context link="question" jump="survey" field="owner"/>
6473                 </delete>
6474             </actions>
6475         </permacrud>
6476         </class>
6477         <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">
6478                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6479                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6480                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6481                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6482                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6483                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6484                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6485                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6486                 </fields>
6487                 <links>
6488                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6489                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6490                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6491                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6492                 </links>
6493         </class>
6494         <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">
6495                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6496                         <field name="balance_owed" reporter:datatype="money" />
6497                         <field name="total_owed" reporter:datatype="money" />
6498                         <field name="total_paid" reporter:datatype="money" />
6499                         <field name="usr" reporter:datatype="link"/>
6500                 </fields>
6501                 <links>
6502                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6503                 </links>
6504         </class>
6505         <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">
6506                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6507                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6508                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6509                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6510                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6511                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6512                 </fields>
6513                 <links>
6514                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6515                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6516                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6517                 </links>
6518         </class>
6519         <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">
6520                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6521                         <field name="field" reporter:datatype="link"/>
6522                         <field name="id" reporter:datatype="id" />
6523                         <field name="source" reporter:datatype="link"/>
6524                         <field name="value" reporter:datatype="text"/>
6525                 </fields>
6526                 <links>
6527                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6528                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6529                 </links>
6530         </class>
6531         <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">
6532                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6533                         <field name="field" reporter:datatype="link"/>
6534                         <field name="id" reporter:datatype="id" />
6535                         <field name="source" reporter:datatype="link"/>
6536                         <field name="value" reporter:datatype="text"/>
6537                 </fields>
6538                 <links>
6539                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6540                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6541                 </links>
6542         </class>
6543         <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">
6544                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6545                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6546                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6547                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6548                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6549                 </fields>
6550                 <links>
6551                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6552                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6553                 </links>
6554         </class>
6555         <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">
6556                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6557                         <field name="depth" reporter:datatype="int" />
6558                         <field name="grantable" reporter:datatype="bool"/>
6559                         <field name="grp" reporter:datatype="link"/>
6560                         <field name="id" reporter:datatype="id" />
6561                         <field name="perm" reporter:datatype="link"/>
6562                 </fields>
6563                 <links>
6564                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6565                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6566                 </links>
6567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6568             <actions>
6569                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6570                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6571                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6572                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6573             </actions>
6574         </permacrud>
6575         </class>
6576         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6577                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6578                         <field name="items" oils_persist:virtual="true" />
6579                         <field name="btype" reporter:datatype="text"/>
6580                         <field name="id" reporter:datatype="id" />
6581                         <field name="name" reporter:datatype="text"/>
6582                         <field name="description" reporter:datatype="text"/>
6583                         <field name="owner" reporter:datatype="link"/>
6584                         <field name="pub" reporter:datatype="bool"/>
6585                         <field name="create_time" reporter:datatype="timestamp" />
6586                 </fields>
6587                 <links>
6588                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6589                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6590                 </links>
6591         </class>
6592         <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">
6593                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6594                         <field name="id" reporter:datatype="id" />
6595                         <field name="bucket" reporter:datatype="link"/>
6596                         <field name="note" reporter:datatype="text" />
6597                 </fields>
6598                 <links>
6599                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6600                 </links>
6601         </class>
6602         <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">
6603                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6604                         <field name="id" reporter:datatype="int" />
6605                         <field name="usr" reporter:datatype="link"/>
6606                         <field name="work_ou" reporter:datatype="link"/>
6607                 </fields>
6608                 <links>
6609                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6610                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6611                 </links>
6612         </class>
6613         <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">
6614                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6615                         <field name="depth" reporter:datatype="int"/>
6616                         <field name="grantable" reporter:datatype="bool"/>
6617                         <field name="id" reporter:datatype="id" />
6618                         <field name="perm" reporter:datatype="link"/>
6619                         <field name="usr" reporter:datatype="link"/>
6620                 </fields>
6621                 <links>
6622                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6623                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6624                 </links>
6625         </class>
6626         <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">
6627                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6628                         <field name="object_id" reporter:datatype="text"/>
6629                         <field name="grantable" reporter:datatype="bool"/>
6630                         <field name="id" reporter:datatype="id" />
6631                         <field name="perm" reporter:datatype="link"/>
6632                         <field name="usr" reporter:datatype="link"/>
6633                         <field name="object_type" reporter:datatype="text"/>
6634                 </fields>
6635                 <links>
6636                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6637                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6638                 </links>
6639         </class>
6640         <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">
6641                 <fields oils_persist:primary="id" oils_persist:sequence="">
6642                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6643                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6644                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6645                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6646                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6647                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6648                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6649                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6650                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6651                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6652                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6653                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6654                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6655                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6656                 </fields>
6657                 <links>
6658                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6659                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6660                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6661                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6662                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6663                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6664                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6665                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6666                 </links>
6667         </class>
6668         <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">
6669                 <fields oils_persist:primary="id" oils_persist:sequence="">
6670                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6671                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6672                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6673                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6674                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6675                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6676                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6677                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6678                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6679                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6680                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6681                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6682                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6683                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6684                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6685                 </fields>
6686                 <links>
6687                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6688                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6689                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6690                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6691                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6692                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6693                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6694                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6695                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6696                 </links>
6697         </class>
6698         <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">
6699                 <fields oils_persist:primary="id" oils_persist:sequence="">
6700                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6701                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6702                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6703                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6704                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6705                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6706                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6707                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6708                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6709                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6710                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6711                 </fields>
6712                 <links>
6713                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6714                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6715                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6716                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6717                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6718                 </links>
6719         </class>
6720         <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">
6721                 <fields oils_persist:primary="id" oils_persist:sequence="">
6722                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6723                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6724                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6725                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6726                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6727                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6728                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6729                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6730                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6731                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6732                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6733                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6734                 </fields>
6735                 <links>
6736                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6737                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6738                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6739                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6740                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6741                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6742                 </links>
6743         </class>
6744         <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">
6745                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6746                         <field name="bucket" reporter:datatype="link"/>
6747                         <field name="id" reporter:datatype="id" />
6748                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6749                         <field name="create_time" reporter:datatype="timestamp" />
6750                         <field name="pos" reporter:datatype="int" />
6751                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6752                 </fields>
6753                 <links>
6754                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6755                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6756             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6757                 </links>
6758         </class>
6759         <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">
6760                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6761                         <field name="id" reporter:datatype="id" />
6762                         <field name="item" reporter:datatype="link"/>
6763                         <field name="note" reporter:datatype="text" />
6764                 </fields>
6765                 <links>
6766                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6767                 </links>
6768         </class>
6769         <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">
6770                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6771                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6772                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6773                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6774                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6775                 </fields>
6776                 <links>
6777                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6778                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6779                 </links>
6780         </class>
6781     <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">
6782         <fields oils_persist:primary="field">
6783             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6784             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6785             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6786         </fields>
6787         <links/>
6788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6789             <actions>
6790                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6791                 <retrieve />
6792                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6793                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6794             </actions>
6795         </permacrud>
6796     </class>
6797         <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">
6798                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6799                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6800                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6801                 </fields>
6802                 <links/>
6803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6804             <actions>
6805                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6806                 <retrieve/>
6807                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6808                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6809             </actions>
6810         </permacrud>
6811         </class>
6812
6813
6814         <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">
6815                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6816                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6817                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6818                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6819                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6820                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6821                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6822                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6823                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6824                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6825                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6826                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6827                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6828                 </fields>
6829                 <links>
6830                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6831                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6832                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6833                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6834                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6835                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6836                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6837                 </links>
6838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6839             <actions>
6840                 <create permission="TRANSIT_COPY">
6841                     <context link="target_copy" field="owner"/>
6842                 </create>
6843                 <retrieve/>
6844                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6845                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6846             </actions>
6847         </permacrud>
6848         </class>
6849         <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">
6850                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6851                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6852                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6853                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6854                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6855                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6856                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6857                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6858                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6859                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6860                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6861                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6862                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6863                 </fields>
6864                 <links>
6865                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6866                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6867                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6868                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6869                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6870                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6871                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6872                 </links>
6873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6874             <actions>
6875                 <create permission="TRANSIT_COPY" context_field="owner">
6876                     <context link="target_copy" field="circ_lib"/>
6877                 </create>
6878                 <retrieve/>
6879                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6880                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6881             </actions>
6882         </permacrud>
6883         </class>
6884         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6885                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6886                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6887                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6888                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6889                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6890                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6891                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6892                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6893                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6894                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6895                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6896                 </fields>
6897                 <links>
6898                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6899                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6900                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6901                 </links>
6902         </class>
6903         <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">
6904                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6905                         <field name="grp" />
6906                         <field name="id" reporter:datatype="id" />
6907                         <field name="usr" />
6908                 </fields>
6909                 <links>
6910                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6911                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6912                 </links>
6913         </class>
6914         <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">
6915                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6916                         <field name="id" reporter:datatype="id" />
6917                         <field name="fq_field" reporter:datatype="text"/>
6918                         <field name="identity_value" reporter:datatype="text"/>
6919                         <field name="translation" reporter:datatype="text"/>
6920                         <field name="string" reporter:datatype="text"/>
6921                 </fields>
6922                 <links>
6923                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6924                 </links>
6925         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6926             <actions>
6927                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6928                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6929                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6930                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6931             </actions>
6932         </permacrud>
6933         </class>
6934         <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">
6935                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6936                         <field name="id" reporter:datatype="id" />
6937                         <field name="fm_class" reporter:datatype="text"/>
6938                         <field name="field" reporter:datatype="text"/>
6939                         <field name="owner" reporter:datatype="org_unit"/>
6940                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6941                 </fields>
6942                 <links>
6943                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6944                 </links>
6945         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6946             <actions>
6947                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6948                 <retrieve/>
6949                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6950                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6951             </actions>
6952         </permacrud>
6953         </class>
6954         <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">
6955                 <fields oils_persist:primary="code">
6956                         <field name="code" reporter:datatype="id" />
6957                         <field name="marc_code" reporter:datatype="text"/>
6958                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6959                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6960                 </fields>
6961                 <links/>
6962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6963             <actions>
6964                 <create permission="CREATE_LOCALE" global_required="true"/>
6965                 <retrieve/>
6966                 <update permission="UPDATE_LOCALE" global_required="true"/>
6967                 <delete permission="DELETE_LOCALE" global_required="true"/>
6968             </actions>
6969         </permacrud>
6970         </class>
6971         <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">
6972                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6973                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6974                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6975                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6976             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6977                 </fields>
6978                 <links>
6979                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6980                 </links>
6981         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6982             <actions>
6983                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6984                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6985                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6986                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6987             </actions>
6988         </permacrud>
6989         </class>
6990
6991         <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">
6992                 <fields oils_persist:primary="id">
6993                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6994                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6995                 </fields>
6996                 <links/>
6997         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6998             <actions>
6999                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7000                 <retrieve/>
7001                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7002                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7003             </actions>
7004         </permacrud>
7005         </class>
7006
7007         <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">
7008                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7009                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7010                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7011                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7012                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7013                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7014                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7015                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7016                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7017                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7018                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7019                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7020                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7021                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7022                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7023                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7024                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7025                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7026                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7027                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7028                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7029                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7030                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7031                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7032                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7033                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7034                 </fields>
7035                 <links>
7036                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7037                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7038                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7039                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7040                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7041                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7042                 </links>
7043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7044             <actions>
7045                 <create permission="user_request.create">
7046                     <context link="usr" field="home_ou"/>
7047                                 </create>
7048                 <retrieve permission="user_request.view">
7049                     <context link="usr" field="home_ou"/>
7050                                 </retrieve>
7051                 <update permission="user_request.update">
7052                     <context link="usr" field="home_ou"/>
7053                                 </update>
7054                 <delete permission="user_request.delete">
7055                     <context link="usr" field="home_ou"/>
7056                                 </delete>
7057             </actions>
7058         </permacrud>
7059         </class>
7060
7061         <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">
7062                 <fields oils_persist:primary="code">
7063                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7064                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7065                 </fields>
7066                 <links/>
7067         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7068             <actions>
7069                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7070                 <retrieve/>
7071                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7072                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7073             </actions>
7074         </permacrud>
7075         </class>
7076
7077         <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">
7078                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7079                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7080                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7081                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7082                         <field reporter:label="Ratio" name="ratio" />
7083                 </fields>
7084                 <links>
7085                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7086                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7087                 </links>
7088                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7089                         <actions>
7090                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7091                                 <retrieve/>
7092                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7093                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7094                         </actions>
7095                 </permacrud>
7096         </class>
7097
7098         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7099                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7100                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7101                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7102                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7103                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7104                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7105                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7106                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7107                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7108                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7109                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7110                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7111                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7112                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7113                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7114                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7115                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7116                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7117                 </fields>
7118                 <links>
7119                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7120                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7121             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7122             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7123             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7124                 </links>
7125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7126             <actions>
7127                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7128                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7129                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7130                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7131             </actions>
7132         </permacrud>
7133         </class>
7134
7135         <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">
7136                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7137                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7138                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7139                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7140                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7141                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7142                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7143                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7144                 </fields>
7145                 <links>
7146                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7147                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7148                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7149                 </links>
7150         </class>
7151
7152         <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">
7153                 <fields oils_persist:primary="code">
7154                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7155                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7156                 </fields>
7157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7158             <actions>
7159                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7160                 <retrieve/>
7161                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7162                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7163             </actions>
7164                 </permacrud>
7165         </class>
7166
7167         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7168                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7169                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7170                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7171                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7172                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7173                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7174                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7175                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7176                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7177                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7178                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7179                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7180                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7181                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7182                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7183                 </fields>
7184                 <links>
7185                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7186                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7187                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7188                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7189                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7190                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7191                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7192                 </links>
7193         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7194             <actions>
7195                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7196                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7197                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7198                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7199             </actions>
7200         </permacrud>
7201         </class>
7202
7203         <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">
7204                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7205                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7206                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7207                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7208                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7209                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7210                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7211                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7212                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7213                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7214                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7215                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7216                 </fields>
7217                 <links>
7218                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7219                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7220                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7221                 </links>
7222         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7223             <actions>
7224                 <create   permission="ADMIN_INVOICE">
7225                                         <context link="invoice" field="receiver"/>
7226                                 </create>
7227                 <retrieve permission="ADMIN_INVOICE">
7228                                         <context link="invoice" field="receiver"/>
7229                                 </retrieve>
7230                 <update   permission="ADMIN_INVOICE">
7231                                         <context link="invoice" field="receiver"/>
7232                                 </update>
7233                                 <delete   permission="ADMIN_INVOICE">
7234                                         <context link="invoice" field="receiver"/>
7235                                 </delete>
7236             </actions>
7237         </permacrud>
7238         </class>
7239
7240         <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">
7241                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7242                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7243                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7244                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7245                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7246                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7247                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7248                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7249                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7250                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7251                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7252                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7253                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7254                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7255                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7256                 </fields>
7257                 <links>
7258                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7259                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7260                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7261                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7262                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7263                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7264                 </links>
7265         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7266             <actions>
7267                 <create   permission="ADMIN_INVOICE">
7268                                         <context link="invoice" field="receiver"/>
7269                                 </create>
7270                 <retrieve permission="ADMIN_INVOICE">
7271                                         <context link="invoice" field="receiver"/>
7272                                 </retrieve>
7273                 <update   permission="ADMIN_INVOICE">
7274                                         <context link="invoice" field="receiver"/>
7275                                 </update>
7276                                 <delete   permission="ADMIN_INVOICE">
7277                                         <context link="invoice" field="receiver"/>
7278                                 </delete>
7279             </actions>
7280         </permacrud>
7281         </class>
7282
7283         <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">
7284                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7285                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7286                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7287                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7288                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7289                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7290                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7291                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7292                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7293                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7294                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7295                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7296                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7297                 </fields>
7298                 <links>
7299                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7300                 </links>
7301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7302             <actions>
7303                 <create permission="ADMIN_PROVIDER">
7304                     <context link="provider" field="owner"/>
7305                 </create>
7306                 <retrieve permission="ADMIN_PROVIDER">
7307                     <context link="provider" field="owner"/>
7308                 </retrieve>
7309                 <update permission="ADMIN_PROVIDER">
7310                     <context link="provider" field="owner"/>
7311                 </update>
7312                 <delete permission="ADMIN_PROVIDER">
7313                     <context link="provider" field="owner"/>
7314                 </delete>
7315             </actions>
7316         </permacrud>
7317         </class>
7318
7319         <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">
7320                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7321                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7322                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7323                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7324                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7325                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7326                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7327         </fields>
7328                 <links>
7329                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7330                 </links>
7331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7332             <actions>
7333                 <create permission="ADMIN_PROVIDER">
7334                     <context link="provider" field="owner"/>
7335                 </create>
7336                 <retrieve permission="ADMIN_PROVIDER">
7337                     <context link="provider" field="owner"/>
7338                 </retrieve>
7339                 <update permission="ADMIN_PROVIDER">
7340                     <context link="provider" field="owner"/>
7341                 </update>
7342                 <delete permission="ADMIN_PROVIDER">
7343                     <context link="provider" field="owner"/>
7344                 </delete>
7345             </actions>
7346         </permacrud>
7347     </class>
7348         <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">
7349                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7350                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7351                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7352                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7353                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7354                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7355                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7356                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7357                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7358                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7359                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7360                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7361                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7362                 </fields>
7363                 <links>
7364                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7365                 </links>
7366         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7367             <actions>
7368                 <create permission="ADMIN_PROVIDER">
7369                     <context link="contact" jump='provider' field="owner"/>
7370                 </create>
7371                 <retrieve permission="ADMIN_PROVIDER">
7372                     <context link="contact" jump='provider' field="owner"/>
7373                 </retrieve>
7374                 <update permission="ADMIN_PROVIDER">
7375                     <context link="contact" jump='provider' field="owner"/>
7376                 </update>
7377                 <delete permission="ADMIN_PROVIDER">
7378                     <context link="contact" jump='provider' field="owner"/>
7379                 </delete>
7380             </actions>
7381         </permacrud>
7382         </class>
7383
7384         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7385                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7386                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7387                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7388                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7389                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7390                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7391                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7392                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7393                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7394                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7395                 </fields>
7396                 <links>
7397                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7398                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7399                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7400                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7401                 </links>
7402         </class>
7403
7404         <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">
7405                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7406                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7407                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7408                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7409                 </fields>
7410                 <links>
7411             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7412                 </links>
7413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7414                         <actions>
7415                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7416                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7417                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7418                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7419                         </actions>
7420                 </permacrud>
7421         </class>
7422
7423         <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">
7424                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7425                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7426                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7427                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7428                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7429                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7430                 </fields>
7431                 <links>
7432                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7433                 </links>
7434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7435                         <actions>
7436                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7437                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7438                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7439                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7440                         </actions>
7441                 </permacrud>
7442         </class>
7443
7444         <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">
7445                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7446                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7447                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7448                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7449                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7450                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7451                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7452                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7453                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7454                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7455                 </fields>
7456                 <links>
7457                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7458                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7459             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7460             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7461                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7462                 </links>
7463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7464             <actions>
7465                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7466                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7467                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7468                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7469             </actions>
7470         </permacrud>
7471         </class>
7472
7473         <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">
7474                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7475                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7476                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7477                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7478                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7479                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7480                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7481                 </fields>
7482                 <links>
7483                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7484                 </links>
7485                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7486                         <actions>
7487                                 <create permission="ADMIN_FUNDING_SOURCE">
7488                     <context link="funding_source" field="owner"/>
7489                 </create>
7490                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7491                     <context link="funding_source" field="owner"/>
7492                 </retrieve>
7493                                 <update permission="ADMIN_FUNDING_SOURCE">
7494                     <context link="funding_source" field="owner"/>
7495                 </update>
7496                                 <delete permission="ADMIN_FUNDING_SOURCE">
7497                     <context link="funding_source" field="owner"/>
7498                 </delete>
7499                         </actions>
7500                 </permacrud>
7501         </class>
7502
7503         <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">
7504                 <fields oils_persist:primary="id">
7505                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7506                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7507                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7508                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7509                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7510                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7511                 </fields>
7512                 <links>
7513                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7514                 </links>
7515         </class>
7516
7517         <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">
7518                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7519                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7520                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7521                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7522                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7523                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7524                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7525                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7526                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7527                 </fields>
7528                 <links>
7529                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7530                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7531                 </links>
7532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7533                         <actions>
7534                                 <create permission="ADMIN_ACQ_FUND">
7535                     <context link="fund" field="org"/>
7536                 </create>
7537                                 <retrieve permission="ADMIN_ACQ_FUND">
7538                     <context link="fund" field="org"/>
7539                 </retrieve>
7540                                 <update permission="ADMIN_ACQ_FUND">
7541                     <context link="fund" field="org"/>
7542                 </update>
7543                                 <delete permission="ADMIN_ACQ_FUND">
7544                     <context link="fund" field="org"/>
7545                 </delete>
7546                         </actions>
7547                 </permacrud>
7548         </class>
7549
7550         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7551                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7552                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7553                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7554                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7555                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7556                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7557                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7558                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7559                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7560                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7561                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7562                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7563                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7564                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7565                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7566                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7567                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7568                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7569                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7570                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7571                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7572                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7573                 </fields>
7574                 <links>
7575                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7576                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7577             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7578             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7579             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7580             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7581             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7582             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7583             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7584             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7585             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7586                 </links>
7587         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7588             <actions>
7589                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7590                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7591                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7592                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7593             </actions>
7594         </permacrud>
7595         </class>
7596
7597         <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">
7598                 <fields oils_persist:primary="fund">
7599                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7600                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7601                 </fields>
7602                 <links>
7603                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7604                 </links>
7605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7606             <actions>
7607                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7608                                         <context link="fund" field="org" />
7609                 </retrieve>
7610             </actions>
7611         </permacrud>
7612         </class>
7613
7614         <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">
7615                 <fields oils_persist:primary="fund">
7616                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7617                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7618                 </fields>
7619                 <links>
7620                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7621                 </links>
7622         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7623             <actions>
7624                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7625                                         <context link="fund" field="org" />
7626                 </retrieve>
7627             </actions>
7628         </permacrud>
7629         </class>
7630
7631         <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">
7632                 <fields oils_persist:primary="fund">
7633                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7634                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7635                 </fields>
7636                 <links>
7637                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7638                 </links>
7639         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7640             <actions>
7641                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7642                                         <context link="fund" field="org" />
7643                 </retrieve>
7644             </actions>
7645         </permacrud>
7646         </class>
7647
7648         <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">
7649                 <fields oils_persist:primary="fund">
7650                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7651                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7652                 </fields>
7653                 <links>
7654                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7655                 </links>
7656         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7657             <actions>
7658                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7659                                         <context link="fund" field="org" />
7660                 </retrieve>
7661             </actions>
7662         </permacrud>
7663         </class>
7664
7665         <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">
7666                 <fields oils_persist:primary="fund">
7667                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7668                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7669                 </fields>
7670                 <links>
7671                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7672                 </links>
7673         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7674             <actions>
7675                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7676                                         <context link="fund" field="org" />
7677                 </retrieve>
7678             </actions>
7679         </permacrud>
7680         </class>
7681
7682    <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">
7683         <fields oils_persist:primary="fund">
7684             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7685             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7686         </fields>
7687         <links>
7688             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7689         </links>
7690     </class>
7691
7692    <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">
7693         <fields oils_persist:primary="fund">
7694             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7695             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7696         </fields>
7697         <links>
7698             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7699         </links>
7700     </class>
7701
7702    <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">
7703         <fields oils_persist:primary="fund">
7704             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7705             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7706         </fields>
7707         <links>
7708             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7709         </links>
7710     </class>
7711
7712    <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">
7713         <fields oils_persist:primary="fund">
7714             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7715             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7716         </fields>
7717         <links>
7718             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7719         </links>
7720     </class>
7721
7722    <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">
7723         <fields oils_persist:primary="fund">
7724             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7725             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7726         </fields>
7727         <links>
7728             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7729         </links>
7730     </class>
7731
7732         <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">
7733                 <fields oils_persist:primary="funding_source">
7734                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7735                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7736                 </fields>
7737                 <links>
7738                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7739                 </links>
7740         </class>
7741
7742         <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">
7743                 <fields oils_persist:primary="funding_source">
7744                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7745                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7746                 </fields>
7747                 <links>
7748                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7749                 </links>
7750         </class>
7751
7752         <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">
7753                 <fields oils_persist:primary="funding_source">
7754                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7755                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7756                 </fields>
7757                 <links>
7758                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7759                 </links>
7760         </class>
7761
7762         <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">
7763                 <fields oils_persist:primary="fund">
7764                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7765                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7766                 </fields>
7767                 <links>
7768                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7769                 </links>
7770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7771             <actions>
7772                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7773                                         <context link="fund" field="org" />
7774                 </retrieve>
7775             </actions>
7776         </permacrud>
7777     </class>
7778     <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">
7779         <oils_persist:source_definition><![CDATA[
7780             SELECT
7781                 acqf.*,
7782                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7783                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7784                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7785                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7786             FROM
7787                 acq.fund acqf
7788                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7789                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7790                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7791                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7792         ]]></oils_persist:source_definition>
7793         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7794             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7795             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7796             <field reporter:label="Name" name="name" reporter:datatype="text" />
7797             <field reporter:label="Year" name="year" reporter:datatype="int" />
7798             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7799             <field reporter:label="Code" name="code" reporter:datatype="text" />
7800             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7801             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7802             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7803             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7804             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7805
7806             <!-- non fund-native fields -->
7807             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7808             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7809             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7810             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7811         </fields>
7812         <links>
7813             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7814             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7815             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7816         </links>
7817         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7818             <actions>
7819                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7820             </actions>
7821         </permacrud>
7822         </class>
7823         <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">
7824                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7825                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7826                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7827                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7828                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7829                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7830                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7831                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7832                 </fields>
7833                 <links>
7834                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7835                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7836                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7837                 </links>
7838                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7839                         <actions>
7840                                 <create permission="ADMIN_ACQ_FUND">
7841                     <context link="fund" field="org"/>
7842                 </create>
7843                                 <retrieve permission="ADMIN_ACQ_FUND">
7844                     <context link="fund" field="org"/>
7845                 </retrieve>
7846                                 <update permission="ADMIN_ACQ_FUND">
7847                     <context link="fund" field="org"/>
7848                 </update>
7849                                 <delete permission="ADMIN_ACQ_FUND">
7850                     <context link="fund" field="org"/>
7851                 </delete>
7852                         </actions>
7853                 </permacrud>
7854         </class>
7855
7856     <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">
7857         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7858             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7859             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7860             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7861             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7862             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7863             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7864             <field reporter:label="Note" name="note" reporter:datatype="text" />
7865             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7866         </fields>
7867         <links>
7868             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7869             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7870             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7871         </links>
7872                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7873                         <actions>
7874                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7875                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7876                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7877                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7878                         </actions>
7879                 </permacrud>
7880     </class>
7881
7882         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7883                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7884                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7885                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7886                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7887                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7888                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7889                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7890                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7891                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7892                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7893                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7894                 </fields>
7895                 <links>
7896                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7897                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7898                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7899                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7900                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7901                 </links>
7902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7903                         <actions>
7904                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7905                         </actions>
7906                 </permacrud>
7907         </class>
7908
7909         <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">
7910                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7911                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7912                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7913                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7914                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7915                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7916                 </fields>
7917                 <links>
7918                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7919                 </links>
7920                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7921                         <actions>
7922                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7923                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7924                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7925                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7926                         </actions>
7927                 </permacrud>
7928         </class>
7929
7930         <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">
7931                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7932                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7933                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7934                         <field reporter:label="Creation 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="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7939                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7940                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7941                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7942                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7943                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7944                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7945                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7946                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7947                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7948                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7949                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7950                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7951                 </fields>
7952                 <links>
7953                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7954                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7955                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7956                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7957                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7958                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7959                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7960                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7961                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7962                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7963                 </links>
7964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7965                         <actions>
7966                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7967                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7968                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7969                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7970                         </actions>
7971                 </permacrud>
7972         </class>
7973
7974         <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">
7975                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7976                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7977                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7978                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7979                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7980                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7981                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7982                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7983                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7984                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7985                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7986                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7987                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7988                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7989                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7990                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7991                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7992                 </fields>
7993                 <links>
7994                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7995                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7996                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7997                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7998                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7999                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8000                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8001                 </links>
8002                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8003             <actions>
8004                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8005             </actions>
8006                 </permacrud>
8007         </class>
8008
8009         <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">
8010                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8011                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8012                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8013                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8014                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8015                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8016                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8017                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8018                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8019                 </fields>
8020                 <links>
8021                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8022                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8023                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8024                 </links>
8025                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8026             <actions>
8027                 <create permission="CREATE_PURCHASE_ORDER">
8028                     <context link="purchase_order" field="ordering_agency"/>
8029                 </create>
8030                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8031                     <context link="purchase_order" field="ordering_agency"/>
8032                 </retrieve>
8033                 <update permission="CREATE_PURCHASE_ORDER">
8034                     <context link="purchase_order" field="ordering_agency"/>
8035                 </update>
8036                 <delete permission="CREATE_PURCHASE_ORDER">
8037                     <context link="purchase_order" field="ordering_agency"/>
8038                 </delete>
8039             </actions>
8040                 </permacrud>
8041         </class>
8042
8043         <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">
8044                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8045                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8046                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8047                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8048                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8049                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8050                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8051                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8052                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8053                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8054                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8055                 </fields>
8056                 <links>
8057                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8058                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8059                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8060                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8061                 </links>
8062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8063             <actions>
8064                 <create permission="CREATE_PURCHASE_ORDER">
8065                     <context link="purchase_order" field="ordering_agency"/>
8066                 </create>
8067                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8068                     <context link="purchase_order" field="ordering_agency"/>
8069                 </retrieve>
8070                 <update permission="CREATE_PURCHASE_ORDER">
8071                     <context link="purchase_order" field="ordering_agency"/>
8072                 </update>
8073                 <delete permission="CREATE_PURCHASE_ORDER">
8074                     <context link="purchase_order" field="ordering_agency"/>
8075                 </delete>
8076             </actions>
8077                 </permacrud>
8078         </class>
8079
8080         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8081                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8082                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8083                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8084                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8085                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8086                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8087                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8088                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8089                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8090                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8091                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8092                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8093                         <field reporter:label="State" name="state" reporter:datatype="text" />
8094                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8095                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8096                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8097                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8098                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8099                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8100                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8101                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8102                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8103                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8104                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8105                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8106                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8107                 </fields>
8108                 <links>
8109                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8110                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8111                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8112                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8113                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8114                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8115                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8116                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8117                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8118                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8119                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8120                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8121                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8122                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8123                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8124                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8125                 </links>
8126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8127                         <actions>
8128                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8129                                         <context link="purchase_order" field="ordering_agency"/>
8130                                         <context link="picklist" field="org_unit"/>
8131                                 </retrieve>
8132                         </actions>
8133                 </permacrud>
8134         </class>
8135
8136         <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">
8137                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8138                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8139                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8140                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8141                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8142                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8143                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8144                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8145                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8146                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8147                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8148                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8149                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8150                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8151                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8152                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8153                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8154                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8155                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8156                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8157                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8158                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8159                 </fields>
8160                 <links>
8161                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8162                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8163                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8164                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8165                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8166                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8167                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8168                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8169                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8170                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8171                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8172                 </links>
8173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8174                         <actions>
8175                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8176                                         <context link="purchase_order" field="ordering_agency"/>
8177                                         <context link="picklist" field="org_unit"/>
8178                                 </retrieve>
8179                         </actions>
8180                 </permacrud>
8181         </class>
8182
8183         <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">
8184                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8185                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8186                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8187                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8188                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8189                 </fields>
8190                 <links>
8191                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8192                 </links>
8193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8194                         <actions>
8195                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8196                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8197                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8198                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8199                         </actions>
8200                 </permacrud>
8201         </class>
8202
8203         <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">
8204                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8205                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8206                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8207                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8208                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8209                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8210                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8211                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8212                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8213                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8214                 </fields>
8215                 <links>
8216                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8217                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8218                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8219                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8220                 </links>
8221         </class>
8222
8223         <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">
8224                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8225                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8226                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8227                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8228                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8229                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8230                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8231                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8232                 </fields>
8233                 <links>
8234                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8235                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8236                 </links>
8237         </class>
8238
8239         <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">
8240                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8241                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8242                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8243                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8244                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8245                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8246                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8247                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8248                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8249                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8250                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8251                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8252                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8253                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8254                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8255                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8256                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8257                 </fields>
8258                 <links>
8259                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8260                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8261                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8262                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8263                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8264                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8265                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8266                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8267                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8268                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8269                 </links>
8270         </class>
8271
8272         <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">
8273                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8274                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8275                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8276                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8277                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8278                 </fields>
8279                 <links/>
8280                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8281                         <actions>
8282                                 <retrieve />
8283                         </actions>
8284                 </permacrud>
8285         </class>
8286
8287         <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">
8288                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8289                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8290                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8291                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8292                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8293                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8294             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8295                 </fields>
8296                 <links/>
8297         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8298             <actions>
8299                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8300                 <retrieve />
8301                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8302                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8303             </actions>
8304         </permacrud>
8305         </class>
8306
8307         <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">
8308                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8309                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8310                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8311                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8312                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8313                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8314                 </fields>
8315                 <links/>
8316         </class>
8317         <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">
8318                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8319                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8320                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8321                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8322                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8323                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8324                 </fields>
8325                 <links>
8326                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8327                 </links>
8328         </class>
8329
8330         <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">
8331             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8332                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8333                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8334                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8335                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8336                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8337                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8338         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8339
8340             </fields>
8341             <links>
8342                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8343             </links>
8344             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8345                 <actions>
8346                     <create permission="ADMIN_PROVIDER">
8347                         <context link="provider" field="owner"/>
8348                     </create>
8349                     <retrieve permission="ADMIN_PROVIDER">
8350                         <context link="provider" field="owner"/>
8351                     </retrieve>
8352                     <update permission="ADMIN_PROVIDER">
8353                         <context link="provider" field="owner"/>
8354                     </update>
8355                     <delete permission="ADMIN_PROVIDER">
8356                         <context link="provider" field="owner"/>
8357                     </delete>
8358                 </actions>
8359             </permacrud>
8360         </class>
8361         
8362         <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">
8363             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8364                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8365                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8366                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8367                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8368             </fields>
8369             <links>
8370                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8371             </links>
8372             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8373                 <actions>
8374                     <create permission="ADMIN_PROVIDER">
8375                         <context link="provider" field="owner"/>
8376                     </create>
8377                     <retrieve permission="ADMIN_PROVIDER">
8378                         <context link="provider" field="owner"/>
8379                     </retrieve>
8380                     <update permission="ADMIN_PROVIDER">
8381                         <context link="provider" field="owner"/>
8382                     </update>
8383                     <delete permission="ADMIN_PROVIDER">
8384                         <context link="provider" field="owner"/>
8385                     </delete>
8386                 </actions>
8387             </permacrud>
8388         </class>
8389         
8390         <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">
8391             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8392                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8393                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8394                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8395                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8396                 </fields>
8397                 <links/>
8398         </class>
8399
8400         <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">
8401                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8402                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8403                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8404                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8405                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8406                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8407                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8408                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8409                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8410                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8411                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8412                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8413                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8414                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8415                 </fields>
8416                 <links>
8417                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8418                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8419                 </links>
8420         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8421             <actions>
8422                 <create permission="ADMIN_PROVIDER">
8423                     <context link="provider" field="owner"/>
8424                 </create>
8425                 <retrieve permission="ADMIN_PROVIDER">
8426                     <context link="provider" field="owner"/>
8427                 </retrieve>
8428                 <update permission="ADMIN_PROVIDER">
8429                     <context link="provider" field="owner"/>
8430                 </update>
8431                 <delete permission="ADMIN_PROVIDER">
8432                     <context link="provider" field="owner"/>
8433                 </delete>
8434             </actions>
8435         </permacrud>
8436         </class>
8437
8438         <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">
8439                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8440                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8441                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8442                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8443                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8444                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8445                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8446                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8447                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8448                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8449                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8450                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8451                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8452                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8453                 </fields>
8454                 <links>
8455                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8456                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8457                 </links>
8458         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8459             <actions>
8460                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8461                     <context link="account" jump="provider" field="owner"/>
8462                 </retrieve>
8463                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8464                     <context link="account" jump="provider" field="owner"/>
8465                 </update>
8466                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8467                     <context link="account" jump="provider" field="owner"/>
8468                 </delete>
8469             </actions>
8470         </permacrud>
8471         </class>
8472
8473
8474         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8475                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8476                         <field name="id" reporter:datatype="id" />
8477                         <field name="parent" reporter:datatype="link"/>
8478                         <field name="owner" reporter:datatype="link"/>
8479                         <field name="create_time" reporter:datatype="timestamp"/>
8480                         <field name="name" reporter:datatype="text"/>
8481                         <field name="shared" reporter:datatype="bool"/>
8482                         <field name="share_with" reporter:datatype="link"/>
8483                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8484                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8485                 </fields>
8486                 <links>
8487                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8488                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8489                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8490                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8491                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8492                 </links>
8493         </class>
8494         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8495                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8496                         <field name="id" reporter:datatype="id" />
8497                         <field name="parent" reporter:datatype="link"/>
8498                         <field name="owner" reporter:datatype="link"/>
8499                         <field name="create_time" reporter:datatype="timestamp"/>
8500                         <field name="name" reporter:datatype="text"/>
8501                         <field name="shared" reporter:datatype="bool"/>
8502                         <field name="share_with" reporter:datatype="link"/>
8503                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8504                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8505                 </fields>
8506                 <links>
8507                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8508                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8509                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8510                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8511                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8512                 </links>
8513         </class>
8514         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8515                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8516                         <field name="id" reporter:datatype="id" />
8517                         <field name="parent" reporter:datatype="link"/>
8518                         <field name="owner" reporter:datatype="link"/>
8519                         <field name="create_time" reporter:datatype="timestamp"/>
8520                         <field name="name" reporter:datatype="text"/>
8521                         <field name="shared" reporter:datatype="bool"/>
8522                         <field name="share_with" reporter:datatype="link"/>
8523                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8524                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8525                 </fields>
8526                 <links>
8527                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8528                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8529                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8530                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8531                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8532                 </links>
8533         </class>
8534         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8535                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8536                         <field name="id" reporter:datatype="id" />
8537                         <field name="owner" reporter:datatype="link"/>
8538                         <field name="create_time" reporter:datatype="timestamp"/>
8539                         <field name="name" reporter:datatype="text"/>
8540                         <field name="data" reporter:datatype="text"/>
8541                         <field name="folder" reporter:datatype="link"/>
8542                         <field name="description" reporter:datatype="text"/>
8543                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8544                 </fields>
8545                 <links>
8546                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8547                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8548                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8549                 </links>
8550         </class>
8551         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8552                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8553                         <field name="id" reporter:datatype="id" />
8554                         <field name="owner" reporter:datatype="link"/>
8555                         <field name="create_time" reporter:datatype="timestamp"/>
8556                         <field name="template" reporter:datatype="link"/>
8557                         <field name="data" reporter:datatype="text"/>
8558                         <field name="folder" reporter:datatype="link"/>
8559                         <field name="recur" reporter:datatype="bool"/>
8560                         <field name="recurrence" reporter:datatype="interval"/>
8561                         <field name="name" reporter:datatype="text"/>
8562                         <field name="description" reporter:datatype="text"/>
8563                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8564                 </fields>
8565                 <links>
8566                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8567                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8568                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8569                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8570                 </links>
8571         </class>
8572         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8573                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8574                         <field name="id" reporter:datatype="id" />
8575                         <field name="runner" reporter:datatype="link"/>
8576                         <field name="start_time" reporter:datatype="timestamp"/>
8577                         <field name="complete_time" reporter:datatype="timestamp"/>
8578                         <field name="run_time" reporter:datatype="timestamp"/>
8579                         <field name="email" reporter:datatype="text"/>
8580                         <field name="excel_format" reporter:datatype="bool"/>
8581                         <field name="csv_format" reporter:datatype="bool"/>
8582                         <field name="html_format" reporter:datatype="bool"/>
8583                         <field name="error_code" reporter:datatype="int"/>
8584                         <field name="error_text" reporter:datatype="text"/>
8585                         <field name="report" reporter:datatype="link"/>
8586                         <field name="folder" reporter:datatype="link"/>
8587                         <field name="chart_pie" reporter:datatype="bool"/>
8588                         <field name="chart_bar" reporter:datatype="bool"/>
8589                         <field name="chart_line" reporter:datatype="bool"/>
8590                 </fields>
8591                 <links>
8592                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8593                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8594                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8595                 </links>
8596         </class>
8597         <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">
8598                 <fields oils_persist:primary="id">
8599                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8600                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8601                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8602                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8603                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8604                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8605                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8606                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8607                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8608                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8609                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8610                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8611                 </fields>
8612                 <links>
8613                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8614                 </links>
8615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8616                         <actions>
8617                                 <retrieve />
8618                         </actions>
8619                 </permacrud>
8620         </class>
8621         <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">
8622                 <fields oils_persist:primary="id">
8623                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8624                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8625                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8626                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8627                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8628                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8629                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8630                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8631                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8632                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8633                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8634                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8635                 </fields>
8636                 <links>
8637                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8638                 </links>
8639         </class>
8640         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8641                 <fields oils_persist:primary="id">
8642                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8643                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8644                         <field reporter:label="Fingerprint" name="fingerprint" />
8645                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8646                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8647                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8648                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8649                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8650                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8651                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8652                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8653                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8654                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8655                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8656                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8657                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8658                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8659                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8660                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8661                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8662                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8663                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8664                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8665                 </fields>
8666                 <links>
8667                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8668                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8669                 </links>
8670         </class>
8671         <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">
8672                 <fields oils_persist:primary="id">
8673                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8674                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8675                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8676                 </fields>
8677                 <links>
8678                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8679                 </links>
8680         </class>
8681         <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">
8682                 <fields oils_persist:primary="id">
8683                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8684                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8685                 </fields>
8686                 <links>
8687                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8688                 </links>
8689         </class>
8690         <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">
8691                 <fields oils_persist:primary="id">
8692                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8693                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8694                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8695                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8696                 </fields>
8697                 <links>
8698                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8699                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8700                 </links>
8701         </class>
8702         <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">
8703                 <fields oils_persist:primary="xact">
8704                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8705                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8706                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8707                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8708                 </fields>
8709                 <links>
8710                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8711                 </links>
8712         </class>
8713         <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">
8714                 <fields oils_persist:primary="xact">
8715                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8716                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8717                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8718                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8719                 </fields>
8720                 <links>
8721                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8722                 </links>
8723         </class>
8724         <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)">
8725                 <fields oils_persist:primary="id">
8726                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8727                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8728                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8729                 </fields>
8730                 <links>
8731                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8732                 </links>
8733         </class>
8734         <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">
8735                 <fields oils_persist:primary="id">
8736                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8737                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8738                 </fields>
8739                 <links>
8740                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8741                 </links>
8742         </class>
8743         <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">
8744                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8745                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8746                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8747                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8748                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8749                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8750                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8751                 </fields>
8752                 <links>
8753                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8754                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8755                 </links>
8756                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8757                         <actions>
8758                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8759                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8760                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8761                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8762                         </actions>
8763                 </permacrud>
8764         </class>
8765         <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">
8766                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8767                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8768                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8769                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8770                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8771                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8772                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8773                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8774                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8775                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8776                 </fields>
8777                 <links>
8778                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8779                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8780                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8781                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8782                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8783                 </links>
8784                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8785                         <actions>
8786                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8787                                         <context link="formula" field="owner"/>
8788                                 </create>
8789                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8790                                         <context link="formula" field="owner"/>
8791                                 </retrieve>
8792                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8793                                         <context link="formula" field="owner"/>
8794                                 </update>
8795                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8796                                         <context link="formula" field="owner"/>
8797                                 </delete>
8798                         </actions>
8799                 </permacrud>
8800         </class>
8801
8802         <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">
8803                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8804                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8805                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8806                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8807                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8808                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8809                 </fields>
8810                 <links>
8811                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8812                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8813                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8814                 </links>
8815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8816                         <actions>
8817                                 <create permission="CREATE_PURCHASE_ORDER">
8818                                         <context link="formula" field="owner"/>
8819                 </create>
8820                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8821                                         <context link="formula" field="owner"/>
8822                 </retrieve>
8823                                 <update permission="CREATE_PURCHASE_ORDER">
8824                                         <context link="formula" field="owner"/>
8825                 </update>
8826                                 <delete permission="CREATE_PURCHASE_ORDER">
8827                                         <context link="formula" field="owner"/>
8828                 </delete>
8829                         </actions>
8830                 </permacrud>
8831         </class>
8832
8833         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8834                 <fields oils_persist:primary="id">
8835                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8836                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8837                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8838                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8839                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8840                 </fields>
8841                 <links>
8842                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8843                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8844                 </links>
8845         </class>
8846
8847         <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">
8848                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8849                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8850                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8851                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8852                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8853                 </fields>
8854                 <links>
8855                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8856                 </links>
8857                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8858                         <actions>
8859                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8860                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8861                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8862                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8863                         </actions>
8864                 </permacrud>
8865         </class>
8866
8867         <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">
8868                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8869                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8870                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8871                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8872                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8873                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8874                 </fields>
8875                 <links>
8876                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8877                 </links>
8878                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8879                         <actions>
8880                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8881                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8882                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8883                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8884                         </actions>
8885                 </permacrud>
8886         </class>
8887
8888         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8889                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8890                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8891                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8892                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8893                 </fields>
8894                 <links>
8895                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8896                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8897                 </links>
8898         </class>
8899
8900         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8901                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8902                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8903                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8904                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8905                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8906                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8907                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8908                 </fields>
8909                 <links>
8910                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8911                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8912                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8913                 </links>
8914         </class>
8915
8916         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8917                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8918                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8919                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8920                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8921                 </fields>
8922                 <links>
8923                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8924                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8925                 </links>
8926         </class>
8927
8928         <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">
8929                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8930                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8931                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8932                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8933                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8934                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8935                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8936                 </fields>
8937                 <links>
8938                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8939                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8940                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8941                 </links>
8942         </class>
8943
8944         <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">
8945                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8946                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8947                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8948                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8949                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8950                 </fields>
8951                 <links>
8952                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8953                 </links>
8954                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8955             <actions>
8956                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8957                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8958                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8959                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8960             </actions>
8961                 </permacrud>
8962         </class>
8963
8964         <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">
8965                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8966                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8967                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8968                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8969                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8970                 </fields>
8971                 <links>
8972                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8973                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8974                 </links>
8975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8976                         <actions>
8977                                 <create permission="ADMIN_CLAIM_POLICY">
8978                                         <context link="claim_policy" field="org_unit"/>
8979                 </create>
8980                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8981                                         <context link="claim_policy" field="org_unit"/>
8982                 </retrieve>
8983                                 <update permission="ADMIN_CLAIM_POLICY">
8984                                         <context link="claim_policy" field="org_unit"/>
8985                 </update>
8986                                 <delete permission="ADMIN_CLAIM_POLICY">
8987                                         <context link="claim_policy" field="org_unit"/>
8988                 </delete>
8989                         </actions>
8990                 </permacrud>
8991         </class>
8992
8993     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8994         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
8995             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8996             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
8997             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8998             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8999             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9000             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9001             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9002             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9003             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9004             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9005             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9006             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9007             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9008             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9009             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9010             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9011         </fields>
9012         <links>
9013             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9014         </links>
9015     </class>
9016
9017     <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">
9018         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9019             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9020             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9021             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9022             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9023             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9024         </fields>
9025     </class>
9026
9027     <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">
9028         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9029             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9030             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9031             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9032             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9033             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9034             <field reporter:label="City" name="city" reporter:datatype="text"/>
9035             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9036             <field reporter:label="State" name="state" reporter:datatype="text"/>
9037             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9038             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9039             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9040         </fields>
9041     </class>
9042
9043     <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">
9044         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9045             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9046             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9047             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9048             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9049             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9050             <field reporter:label="City" name="city" reporter:datatype="text"/>
9051             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9052             <field reporter:label="State" name="state" reporter:datatype="text"/>
9053             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9054             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9055             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9056         </fields>
9057     </class>
9058
9059     <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">
9060         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9061             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9062             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9063             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9064             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9065             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9066             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9067         </fields>
9068     </class>
9069
9070         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9071                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9072                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9073                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9074                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9075                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9076                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9077                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9078                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9079                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9080                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9081                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9082                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9083                 </fields>
9084                 <links>
9085                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9086                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9087                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9088                 </links>
9089         </class>
9090
9091         <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">
9092                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9093                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9094                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9095                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9096                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9097                 </fields>
9098                 <links>
9099                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9100                 </links>
9101         </class>
9102
9103     <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">
9104         <fields>
9105             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9106             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9107             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9108         </fields>
9109                 <links>
9110                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9111                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9112                 </links>
9113     </class>
9114
9115     <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">
9116         <fields>
9117             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9118             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9119         </fields>
9120                 <links>
9121                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9122                 </links>
9123     </class>
9124
9125     <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">
9126         <fields>
9127             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9128             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9129             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9130         </fields>
9131                 <links>
9132                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9133                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9134                 </links>
9135     </class>
9136
9137     <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">
9138         <fields>
9139             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9140             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9141         </fields>
9142                 <links>
9143                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9144                 </links>
9145     </class>
9146
9147     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9148                 <oils_persist:source_definition>
9149
9150             SELECT  DISTINCT l.*
9151               FROM  action.unfulfilled_hold_loops l
9152                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9153               WHERE l.count = m.max
9154
9155                 </oils_persist:source_definition>
9156         <fields>
9157             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9158             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9159             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9160         </fields>
9161                 <links>
9162                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9163                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9164                 </links>
9165     </class>
9166
9167         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9168                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9169                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9170                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9171                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9172                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9173                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9174                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9175                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9176                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9177                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9178                 </fields>
9179                 <links>
9180                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9181                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9182                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9183                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9184                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9185                 </links>
9186         </class>
9187
9188         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9189                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9190                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9191                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9192                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9193                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9194                 </fields>
9195                 <links>
9196                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9197                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9198                 </links>
9199         </class>
9200
9201         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9202                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9203                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9204                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9205                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9206                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9207                 </fields>
9208                 <links>
9209                 </links>
9210         </class>
9211
9212         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9213                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9214                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9215                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9216                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9217                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9218                 </fields>
9219                 <links>
9220                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9221                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9222                 </links>
9223         </class>
9224         
9225         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9226                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9227                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9228                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9229                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9230                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9231                 </fields>
9232                 <links>
9233                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9234                 </links>
9235         </class>
9236         
9237         <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">
9238                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9239                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9240                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9241                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9242                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9243                 </fields>
9244                 <links>
9245                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9246                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9247                 </links>
9248         </class>
9249
9250         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9251                 <fields oils_persist:primary="name">
9252                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9253                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9254                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9255                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9256                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9257                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9258                 </fields>
9259                 <links>
9260                 </links>
9261         </class>
9262
9263         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9264                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9265                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9266                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9267                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9268                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9269                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9270                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9271                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9272                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9273                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9274                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9275                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9276                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9277                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9278                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9279                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9280                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9281                 </fields>
9282                 <links>
9283                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9284                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9285                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9286                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9287                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9288                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9289                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9290                 </links>
9291         </class>
9292
9293         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9294                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9295                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9296                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9297                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9298                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9299                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9300                 </fields>
9301                 <links>
9302                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9303                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9304                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9305                 </links>
9306         </class>
9307
9308         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9309                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9310                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9311                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9312                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9313                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9314                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9315                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9316                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9317                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9318                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9319                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9320                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9321                 </fields>
9322                 <links>
9323                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9324                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9325                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9326                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9327                 </links>
9328         </class>
9329
9330         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9331                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9332                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9333                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9334                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9335                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9336                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9337                 </fields>
9338                 <links>
9339                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9340                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9341                 </links>
9342         </class>
9343
9344         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9345                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9346                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9347                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9348                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9349                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9350                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9351                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9352                 </fields>
9353                 <links>
9354                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9355                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9356                 </links>
9357         </class>
9358
9359         <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">
9360                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9361                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9362                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9363                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9364                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9365                 </fields>
9366                 <links>
9367                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9368                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9369                 </links>
9370         </class>
9371
9372         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9373                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9374                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9375                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9376                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9377                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9378                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9379                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9380                 </fields>
9381                 <links>
9382                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9383                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9384                 </links>
9385         </class>
9386
9387         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9388                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9389                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9390                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9391                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9392                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9393                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9394                 </fields>
9395                 <links>
9396                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9397                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9398                 </links>
9399         </class>
9400
9401         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9402                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9403                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9404                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9405                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9406                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9407                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9408                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9409                 </fields>
9410                 <links>
9411                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9412                 </links>
9413         </class>
9414
9415         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9416                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9417                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9418                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9419                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9420                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9421                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9422                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9423                 </fields>
9424                 <links>
9425                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9426                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9427                 </links>
9428         </class>
9429
9430         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9431                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9432                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9433                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9434                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9435                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9436                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9437                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9438                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9439                 </fields>
9440                 <links>
9441                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9442                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9443                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9444                 </links>
9445         </class>
9446
9447         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9448                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9449                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9450                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9451                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9452                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9453                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9454                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9455                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9456                 </fields>
9457                 <links>
9458                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9459                 </links>
9460         </class>
9461
9462         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9463                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9464                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9465                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9466                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9467                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9468                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9469                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9470                 </fields>
9471                 <links>
9472                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9473                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9474                 </links>
9475         </class>
9476
9477         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9478                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9479                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9480                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9481                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9482                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9483                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9484                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9485                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9486                 </fields>
9487                 <links>
9488                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9489                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9490                 </links>
9491         </class>
9492
9493         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9494                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9495                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9496                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9497                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9498                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9499                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9500                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9501                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9502                 </fields>
9503                 <links>
9504                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9505                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9506                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9507                 </links>
9508         </class>
9509
9510         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9511                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9512                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9513                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9514                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9515                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9516                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9517                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9518                 </fields>
9519                 <links>
9520                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9521                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9522                 </links>
9523         </class>
9524
9525         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9526                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9527                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9528                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9529                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9530                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9531                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9532                 </fields>
9533                 <links>
9534                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9535                 </links>
9536         </class>
9537
9538         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9539                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9540                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9541                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9542                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9543                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9544                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9545                 </fields>
9546                 <links>
9547                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9548                 </links>
9549         </class>
9550
9551         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9552                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9553                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9554                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9555                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9556                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9557                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9558                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9559                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9560                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9561                 </fields>
9562                 <links>
9563                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9564                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9565                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9566                 </links>
9567         </class>
9568
9569         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9570                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9571                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9572                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9573                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9574                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9575                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9576                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9577                 </fields>
9578                 <links>
9579                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9580                 </links>
9581         </class>
9582
9583         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9584                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9585                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9586                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9587                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9588                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9589                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9590                 </fields>
9591                 <links>
9592                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9593                 </links>
9594         </class>
9595
9596         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9597                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9598                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9599                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9600                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9601                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9602                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9603                 </fields>
9604                 <links>
9605                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9606                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9607                 </links>
9608         </class>
9609
9610         <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">
9611                 <fields oils_persist:primary="id">
9612                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9613                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9614                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9615                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9616                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9617                 </fields>
9618                 <links>
9619                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9620                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9621                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9622                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9623                 </links>
9624         </class>
9625
9626         <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">
9627                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9628                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9629                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9630                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9631                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9632                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9633                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9634                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9635                 </fields>
9636                 <links/>
9637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9638                         <actions>
9639                                 <retrieve/>
9640                         </actions>
9641                 </permacrud>
9642         </class>
9643
9644         <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">
9645                 <fields oils_persist:primary="ptype_key">
9646                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9647                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9648                 </fields>
9649                 <links/>
9650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9651                         <actions>
9652                                 <retrieve/>
9653                         </actions>
9654                 </permacrud>
9655         </class>
9656
9657         <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">
9658                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9659                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9660                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9661                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9662                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9663                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9664                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9665                 </fields>
9666                 <links>
9667                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9668                 </links>
9669                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9670                         <actions>
9671                                 <retrieve/>
9672                         </actions>
9673                 </permacrud>
9674         </class>
9675
9676         <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">
9677                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9678                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9679                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9680                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9681                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9682                 </fields>
9683                 <links>
9684                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9685                 </links>
9686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9687                         <actions>
9688                                 <retrieve/>
9689                         </actions>
9690                 </permacrud>
9691         </class>
9692
9693     <class
9694         id="uvs"
9695         controller="open-ils.cstore open-ils.pcrud"
9696         oils_obj:fieldmapper="url_verify::session"
9697         oils_persist:tablename="url_verify.session"
9698         reporter:label="URL Verification Session"
9699     >
9700         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9701             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9702             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9703                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9704             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9705             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9706             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9707             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9708             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9709             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9710         </fields>
9711
9712         <links>
9713             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9714             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9715             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9716             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9717             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9718         </links>
9719
9720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9721             <actions>
9722                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9723             </actions>
9724         </permacrud>
9725
9726     </class>
9727
9728     <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">
9729         <oils_persist:source_definition>
9730             SELECT
9731                 cbrebi.id AS id,  -- so we can have a pkey in our view
9732                 uvs.id AS session,
9733                 uvs.owning_lib,
9734                 cbrebi.target_biblio_record_entry
9735             FROM url_verify.session uvs
9736             JOIN container.biblio_record_entry_bucket cbreb
9737                 ON (uvs.container = cbreb.id)
9738             JOIN container.biblio_record_entry_bucket_item cbrebi
9739                 ON (cbrebi.bucket = cbreb.id)
9740         </oils_persist:source_definition>
9741         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9742             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9743             <field reporter:label="Session" name="session" reporter:datatype="link" />
9744             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9745             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9746         </fields>
9747         <links>
9748             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9749             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9750             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9751         </links>
9752         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9753             <actions>
9754                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9755             </actions>
9756         </permacrud>
9757     </class>
9758
9759     <class
9760         id="uvus"
9761         controller="open-ils.cstore open-ils.pcrud"
9762         oils_obj:fieldmapper="url_verify::url_selector"
9763         oils_persist:tablename="url_verify.url_selector"
9764         reporter:label="URL Verification URL Selector"
9765     >
9766         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9767             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9768             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9769                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9770             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9771         </fields>
9772
9773         <links>
9774             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9775             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9776         </links>
9777
9778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9779             <actions>
9780                 <create permission="URL_VERIFY">
9781                     <context link="session" field="owning_lib"/>
9782                 </create>
9783                 <retrieve permission="URL_VERIFY">
9784                     <context link="session" field="owning_lib"/>
9785                 </retrieve>
9786                 <update permission="URL_VERIFY">
9787                     <context link="session" field="owning_lib"/>
9788                 </update>
9789                 <delete permission="URL_VERIFY">
9790                     <context link="session" field="owning_lib"/>
9791                 </delete>
9792             </actions>
9793         </permacrud>
9794
9795     </class>
9796
9797     <class
9798         id="uvu"
9799         controller="open-ils.cstore open-ils.pcrud"
9800         oils_obj:fieldmapper="url_verify::url"
9801         oils_persist:tablename="url_verify.url"
9802         reporter:label="URL Verification URL"
9803     >
9804         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9805             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9806                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9807                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9808                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9809                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9810             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9811             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9812             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9813             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9814             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9815             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9816             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9817             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9818             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9819             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9820             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9821             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9822             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9823         </fields>
9824
9825         <links>
9826             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9827             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9828             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9829             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9830             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9831         </links>
9832
9833         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9834             <actions>
9835                 <create permission="URL_VERIFY">
9836                     <context link="session" field="owning_lib"/>
9837                 </create>
9838                 <retrieve permission="URL_VERIFY">
9839                     <context link="session" field="owning_lib"/>
9840                 </retrieve>
9841                 <update permission="URL_VERIFY">
9842                     <context link="session" field="owning_lib"/>
9843                 </update>
9844                 <delete permission="URL_VERIFY">
9845                     <context link="session" field="owning_lib"/>
9846                 </delete>
9847             </actions>
9848         </permacrud>
9849
9850     </class>
9851
9852     <class
9853         id="uvva"
9854         controller="open-ils.cstore open-ils.pcrud"
9855         oils_obj:fieldmapper="url_verify::verification_attempt"
9856         oils_persist:tablename="url_verify.verification_attempt"
9857         reporter:label="URL Verification Attempt"
9858     >
9859         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9860             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9861                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9862                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9863             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9864             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9865         </fields>
9866
9867         <links>
9868             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9869             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9870         </links>
9871
9872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9873             <actions>
9874                 <create permission="URL_VERIFY">
9875                     <context link="session" field="owning_lib"/>
9876                 </create>
9877                 <retrieve permission="URL_VERIFY">
9878                     <context link="session" field="owning_lib"/>
9879                 </retrieve>
9880                 <update permission="URL_VERIFY">
9881                     <context link="session" field="owning_lib"/>
9882                 </update>
9883                 <delete permission="URL_VERIFY">
9884                     <context link="session" field="owning_lib"/>
9885                 </delete>
9886             </actions>
9887         </permacrud>
9888
9889     </class>
9890
9891     <class
9892         id="uvuv"
9893         controller="open-ils.cstore open-ils.pcrud"
9894         oils_obj:fieldmapper="url_verify::url_verification"
9895         oils_persist:tablename="url_verify.url_verification"
9896         reporter:label="URL Verification"
9897     >
9898         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9899             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9900                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9901                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9902             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9903             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9904             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9905             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9906                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9907         </fields>
9908
9909         <links>
9910             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9911             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9912             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9913         </links>
9914
9915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9916             <actions>
9917                 <create permission="URL_VERIFY">
9918                     <context link="attempt" jump="session" field="owning_lib"/>
9919                 </create>
9920                 <retrieve permission="URL_VERIFY">
9921                     <context link="attempt" jump="session" field="owning_lib"/>
9922                 </retrieve>
9923                 <update permission="URL_VERIFY">
9924                     <context link="attempt" jump="session" field="owning_lib"/>
9925                 </update>
9926                 <delete permission="URL_VERIFY">
9927                     <context link="attempt" jump="session" field="owning_lib"/>
9928                 </delete>
9929             </actions>
9930         </permacrud>
9931
9932     </class>
9933
9934         <class
9935                 id="cfdi"
9936                 controller="open-ils.cstore open-ils.pcrud"
9937                 oils_obj:fieldmapper="config::filter_dialog_interface"
9938                 oils_persist:tablename="config.filter_dialog_interface"
9939                 reporter:label="FilterDialog Interface">
9940                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9941                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9942                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9943                 </fields>
9944                 <links>
9945                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9946                 </links>
9947                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9948                         <actions>
9949                                 <retrieve />
9950                         </actions>
9951                 </permacrud>
9952         </class>
9953
9954         <class
9955                 id="cfdfs"
9956                 controller="open-ils.cstore open-ils.pcrud"
9957                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9958                 oils_persist:tablename="config.filter_dialog_filter_set"
9959                 reporter:label="FilterDialog Filter Set">
9960                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9961                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9962                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9963                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9964                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9965                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9966                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9967                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9968                 </fields>
9969                 <links>
9970                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9971                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9972                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9973                 </links>
9974                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9975                         <actions>
9976                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9977                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9978                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9979                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9980                         </actions>
9981                 </permacrud>
9982
9983         </class>
9984
9985         <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">
9986                 <fields oils_persist:primary="code">
9987                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9988                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9989                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9990                 </fields>
9991                 <links/>
9992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9993                         <actions>
9994                                 <retrieve/>
9995                         </actions>
9996                 </permacrud>
9997         </class>
9998
9999         <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">
10000                 <oils_persist:source_definition>
10001
10002             SELECT  b.id,
10003                     MAX(dcp.edit_date) AS last_delete_date
10004              FROM   biblio.record_entry b
10005                     JOIN asset.call_number cn ON (cn.record = b.id)
10006                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10007              WHERE  NOT b.deleted
10008              GROUP BY b.id
10009              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10010
10011                 </oils_persist:source_definition>
10012                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10013                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10014                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10015                 </fields>
10016                 <links>
10017                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10018                 </links>
10019                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10020                         <actions>
10021                                 <retrieve/>
10022                         </actions>
10023                 </permacrud>
10024         </class>
10025
10026         <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">
10027                 <oils_persist:source_definition>
10028
10029             -- -- 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.
10030             -- -- 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
10031             -- -- may not.
10032             -- SELECT
10033             --     bre.id AS "bib_id",
10034             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10035             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10036             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10037             -- FROM (
10038                 SELECT
10039                     y.bre AS "id",
10040                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10041                     y.hold_count AS "hold_count",
10042                     (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"
10043                 FROM (
10044                         SELECT
10045                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10046                             COUNT(*) AS "hold_count"
10047                         FROM action.hold_request h
10048                         WHERE
10049                             cancel_time IS NULL
10050                             AND fulfillment_time IS NULL
10051                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10052                         GROUP BY 1
10053                     )y LEFT JOIN (
10054                         SELECT 
10055                             (SELECT id
10056                                 FROM biblio.record_entry 
10057                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
10058                             ) AS "bre", 
10059                             COUNT(*) AS "copy_count"
10060                         FROM asset.copy
10061                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10062                         WHERE copy.holdable 
10063                             AND NOT copy.deleted 
10064                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10065                         GROUP BY 1
10066                     )x ON x.bre = y.bre
10067                 -- )z RIGHT JOIN (
10068                 --     SELECT id
10069                 --     FROM biblio.record_entry
10070                 --     WHERE NOT deleted
10071                 -- )bre ON (z.bib_id = bre.id)
10072                 
10073
10074                 </oils_persist:source_definition>
10075                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10076                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10077                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10078                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10079                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10080                 </fields>
10081                 <links>
10082                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10083                 </links>
10084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10085                         <actions>
10086                                 <retrieve/>
10087                         </actions>
10088                 </permacrud>
10089         </class>
10090
10091         <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">
10092                 <oils_persist:source_definition>
10093             SELECT *,
10094                 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,
10095                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10096             FROM
10097                 (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
10098                     FROM
10099                         action.hold_request ahr
10100                         JOIN reporter.hold_request_record rhrr USING (id)
10101                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10102                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10103                     WHERE
10104                         ahr.cancel_time IS NULL
10105                         AND ahr.fulfillment_time IS NULL
10106                     GROUP BY bib_record, pickup_lib
10107                 )x
10108                 JOIN
10109                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10110                     FROM
10111                         action.hold_request ahr
10112                         JOIN reporter.hold_request_record rhrr USING (id)
10113                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10114                     WHERE
10115                         ahr.cancel_time IS NULL
10116                         AND ahr.fulfillment_time IS NULL
10117                     GROUP BY bib_record
10118                 )y
10119                 USING (id)
10120                 </oils_persist:source_definition>
10121                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10122                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10123                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10124                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10125                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10126                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10127                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10128                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10129                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10130                 </fields>
10131                 <links>
10132                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10133                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10134                 </links>
10135                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10136                         <actions>
10137                                 <retrieve/>
10138                         </actions>
10139                 </permacrud>
10140         </class>
10141
10142         <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">
10143                 <oils_persist:source_definition>
10144             SELECT
10145                 ac.id,
10146                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10147                 MAX(actac.xact_start) AS last_circ
10148             FROM asset.copy ac
10149                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10150             GROUP BY ac.id
10151
10152             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10153             --SELECT
10154             --    ac.id,
10155             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10156             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10157             --FROM asset.copy ac
10158             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10159             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10160             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10161                 </oils_persist:source_definition>
10162                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10163                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10164                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10165                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10166                 </fields>
10167                 <links>
10168                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10169                 </links>
10170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10171                         <actions>
10172                                 <retrieve/>
10173                         </actions>
10174                 </permacrud>
10175         </class>
10176
10177         <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">
10178                 <fields oils_persist:primary="id">
10179                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10180                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10181                 </fields>
10182                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10183                         <actions>
10184                                 <retrieve/>
10185                         </actions>
10186                 </permacrud>
10187         </class>
10188
10189         <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">
10190                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10191                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10192                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10193                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10194                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10195                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10196                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10197                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10198                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10199                 </fields>
10200                 <links>
10201                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10202                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10203                 </links>
10204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10205                         <actions>
10206                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10207                                 <retrieve/>
10208                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10209                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10210                         </actions>
10211                 </permacrud>
10212         </class>
10213
10214         <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">
10215                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10216                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10217                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10218                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10219                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10220                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10221                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10222                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10223                 </fields>
10224                 <links>
10225                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10226                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10227                 </links>
10228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10229                         <actions>
10230                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10231                                 <retrieve/>
10232                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10233                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10234                         </actions>
10235                 </permacrud>
10236         </class>
10237
10238
10239         <!-- ********************************************************************************************************************* -->
10240         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10241         <!-- ********************************************************************************************************************* -->
10242         <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">
10243                 <fields oils_persist:primary="id">
10244                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10245                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10246                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10247                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10248                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10249                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10250                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10251                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10252                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10253                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10254                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10255                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10256                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10257                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10258                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10259                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10260                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10261                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10262                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10263                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10264                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10265                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10266                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10267                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10268                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10269                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10270                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10271                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10272                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10273                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10274                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10275                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10276                 </fields>
10277                 <links>
10278                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10279                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10280                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10281                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10282                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10283                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10284                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10285                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10286                 </links>
10287         </class>
10288
10289         <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">
10290                 <fields oils_persist:primary="id">
10291                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10292                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10293                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10294                 </fields>
10295                 <links>
10296                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10297                 </links>
10298         </class>
10299
10300         <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">
10301                 <fields oils_persist:primary="id">
10302                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10303                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10304                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10305                 </fields>
10306                 <links>
10307                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10308                 </links>
10309         </class>
10310
10311         <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">
10312                 <fields oils_persist:primary="id">
10313                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10314
10315                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10316                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10317                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10318
10319                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10320                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10321                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10322
10323                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10324                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10325
10326                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10327                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10328                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10329
10330                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10331                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10332
10333                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10334                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10335                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10336
10337                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10338                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10339                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10340
10341                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10342                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10343                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10344                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10345
10346                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10347                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10348
10349                 </fields>
10350                 <links>
10351                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10352                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10353                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10354                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10355                 </links>
10356         </class>
10357
10358         <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">
10359                 <oils_persist:source_definition>
10360
10361             SELECT
10362                 po.ordering_agency AS ordering_agency,
10363                 po.id AS purchase_order,
10364                 li.id AS lineitem,
10365                 lid.id AS lineitem_detail,
10366                 cpa.id AS claim_policy_action
10367             FROM
10368                 acq.lineitem_detail lid
10369                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10370                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10371                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10372                 JOIN acq.claim_policy_action cpa ON (
10373                     cpa.claim_policy = cp.id
10374
10375                     -- we only care about claim policy actions whose claim
10376                     -- interval we'd reached or exceeded
10377                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10378
10379                     -- filter out all claim policy actions where claim events
10380                     -- have occurred on or after the action's action_interval
10381                     AND NOT EXISTS (
10382                         SELECT 1
10383                         FROM
10384                             acq.claim_event evt
10385                             JOIN acq.claim claim ON (
10386                                 claim.id = evt.claim
10387                                 AND claim.lineitem_detail = lid.id
10388                             )
10389                         WHERE
10390                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10391                     )
10392                 )
10393             WHERE
10394                 lid.cancel_reason IS NULL
10395                 AND li.cancel_reason IS NULL -- belt/suspenders
10396                 AND po.cancel_reason IS NULL -- belt/suspenders
10397                 AND lid.recv_time IS NULL
10398                 AND po.state = 'on-order'
10399             ORDER BY 1, 2, 3, 4, 5
10400
10401                 </oils_persist:source_definition>
10402                 <fields>
10403                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10404                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10405                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10406                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10407                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10408                 </fields>
10409                 <links>
10410                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10411                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10412                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10413                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10414                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10415                 </links>
10416         </class>
10417         <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">
10418                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10419                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10420                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10421                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10422                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10423                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10424                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10425                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10426                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10427                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10428                 </fields>
10429                 <links>
10430                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10431                 </links>
10432     </class>
10433         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10434                 <oils_persist:source_definition>
10435             SELECT * FROM acq.lineitem_summary 
10436                                 WHERE item_count > (invoice_count + cancel_count)
10437         </oils_persist:source_definition>
10438                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10439                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10440                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10441                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10442                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10443                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10444                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10445                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10446                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10447                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10448                 </fields>
10449                 <links>
10450                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10451                 </links>
10452     </class>
10453         <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">
10454                 <oils_persist:source_definition>
10455
10456                         SELECT  t.*
10457                           FROM  action.transit_copy t
10458                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10459                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10460                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10461
10462                 </oils_persist:source_definition>
10463                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10464                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10465                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10466                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10467                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10468                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10469                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10470                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10471                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10472                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10473                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10474                 </fields>
10475                 <links>
10476                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10477                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10478                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10479                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10480                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10481                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10482                 </links>
10483         </class>
10484
10485     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10486                 <oils_persist:source_definition>
10487
10488         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10489                 SELECT
10490                         cp.id as copy,
10491                         COUNT(circ.id),
10492                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10493                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10494                 FROM
10495                         asset.copy cp
10496                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10497                 GROUP BY 1, 3, 4
10498                 UNION ALL
10499                 SELECT
10500                         cp.id as copy,
10501                         COUNT(circ.id),
10502                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10503                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10504                 FROM
10505                         asset.copy cp
10506                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10507                 GROUP BY 1, 3, 4
10508                 UNION ALL
10509                 SELECT
10510                         id as copy,
10511                         circ_count,
10512                         -1 AS year,
10513                         false as is_renewal
10514                 FROM
10515                         extend_reporter.legacy_circ_count
10516         )x GROUP BY 1, 3, 4
10517
10518                 </oils_persist:source_definition>
10519         <fields>
10520             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10521             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10522             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10523             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10524         </fields>
10525                 <links>
10526                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10527                 </links>
10528                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10529                         <actions>
10530                                 <retrieve/>
10531                         </actions>
10532                 </permacrud>
10533     </class>
10534
10535         <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">
10536                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10537                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10538                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10539                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10540                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10541                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10542                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10543                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10544                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10545                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10546                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10547                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10548                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10549                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10550                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10551                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10552                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10553                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10554                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10555                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10556                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10557                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10558                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10559                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10560                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10561                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10562                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10563                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10564                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10565                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10566                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10567                 </fields>
10568                 <links>
10569                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10570                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10571                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10572                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10573                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10574                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10575                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10576                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10577                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10578                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10579                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10580                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10581                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10582                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10583                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10584                 </links>
10585         </class>
10586
10587     <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">
10588         <fields oils_persist:primary="id">
10589             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10590             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10591             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
10592             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10593             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10594             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10595             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10596             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10597             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10598             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10599             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10600             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10601             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10602             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10603             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10604             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10605             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10606             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10607             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10608             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10609             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10610             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10611             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10612             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10613             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10614             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10615             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10616             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10617             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10618             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10619             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10620             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10621             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10622             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10623         </fields>
10624         <links>
10625             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10626             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10627             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10628             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10629             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10630         </links>
10631     </class>
10632
10633     <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">
10634         <fields oils_persist:primary="id">
10635             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10636             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10637             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10638             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10639         </fields>
10640         <links>
10641             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10642             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10643         </links>
10644     </class>
10645
10646     <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">
10647         <fields oils_persist:primary="owning_lib">
10648             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10649             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10650             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10651         </fields>
10652         <links>
10653             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10654         </links>
10655     </class>
10656
10657     <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">
10658         <fields oils_persist:primary="id">
10659             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10660             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10661             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10662             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10663             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10664         </fields>
10665         <links>
10666             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10667             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10668             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10669         </links>
10670     </class>
10671
10672     <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">
10673         <fields oils_persist:primary="circ_lib">
10674             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10675             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10676             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10677             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10678         </fields>
10679         <links>
10680             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10681             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10682         </links>
10683     </class>
10684
10685     <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">
10686         <fields oils_persist:primary="id">
10687             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10688             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10689             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10690             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10691             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10692         </fields>
10693         <links>
10694             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10695             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10696             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10697         </links>
10698     </class>
10699
10700     <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">
10701         <fields oils_persist:primary="home_ou">
10702             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10703             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10704             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10705             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10706         </fields>
10707         <links>
10708             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10709             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10710         </links>
10711     </class>
10712         <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">
10713                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10714                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10715                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10716                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10717                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10718                 </fields>
10719                 <links>
10720                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10721                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10722                 </links>
10723                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10724                         <actions>
10725                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10726                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10727                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10728                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10729                         </actions>
10730                 </permacrud>
10731         </class>
10732         <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">
10733                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10734                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10735                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10736                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10737                 </fields>
10738                 <links>
10739                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10740                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10741                         </links>
10742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10743                 <actions>
10744                                 <create permission="ADMIN_ACQ_FUND_TAG">
10745                                         <context link="tag" field="owner"/>
10746                                 </create>
10747                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10748                                         <context link="tag" field="owner"/>
10749                                 </retrieve>
10750                                 <update permission="ADMIN_ACQ_FUND_TAG">
10751                                         <context link="tag" field="owner"/>
10752                                 </update>
10753                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10754                                         <context link="tag" field="owner"/>
10755                                 </delete>
10756                         </actions>
10757                 </permacrud>
10758         </class>
10759         <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">
10760                 <oils_persist:source_definition><![CDATA[
10761                 SELECT
10762                         poi.purchase_order AS purchase_order,
10763                         ii.invoice AS invoice,
10764                         NULL AS lineitem,
10765                         poi.id AS po_item,
10766                         NULL AS picklist
10767                 FROM
10768                         acq.po_item poi
10769                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10770                 UNION SELECT
10771                         jub.purchase_order AS purchase_order,
10772                         ie.invoice AS invoice,
10773                         jub.id AS lineitem,
10774                         NULL AS po_item,
10775                         jub.picklist AS picklist
10776                 FROM
10777                         acq.lineitem jub
10778                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10779                 UNION SELECT
10780                         ii.purchase_order AS purchase_order,
10781                         ii.invoice AS invoice,
10782                         NULL AS lineitem,
10783                         NULL AS po_item,
10784                         NULL AS picklist
10785                 FROM
10786                         acq.invoice_item ii
10787                 WHERE ii.po_item IS NULL
10788                 UNION SELECT
10789                         ie.purchase_order AS purchase_order,
10790                         ie.invoice AS invoice,
10791                         NULL AS lineitem,
10792                         NULL AS po_item,
10793                         NULL AS picklist
10794                 FROM
10795                         acq.invoice_entry ie
10796                 WHERE ie.lineitem IS NULL
10797                 UNION SELECT
10798                         NULL AS purchase_order,
10799                         NULL AS invoice,
10800                         jub.id AS lineitem,
10801                         NULL AS po_item,
10802                         jub.picklist AS picklist
10803                 FROM
10804                         acq.lineitem jub
10805                 WHERE jub.purchase_order IS NULL
10806                 ]]></oils_persist:source_definition>
10807                 <fields>
10808                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10809                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10810                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10811                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10812                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10813                 </fields>
10814                 <links>
10815                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10816                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10817                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10818                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10819                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10820                 </links>
10821         </class>
10822         <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">
10823                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10824                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10825                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10826                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10827                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10828                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10829                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10830                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10831                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10832                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10833                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10834                 </fields>
10835                 <links>
10836                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10837                 </links>
10838                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10839                         <actions>
10840                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10841                                 <retrieve/>
10842                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10843                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10844                         </actions>
10845                 </permacrud>
10846         </class>
10847
10848         <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">
10849                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10850                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10851                         <field name="date_applied" reporter:datatype="timestamp"/>
10852                         <field name="org" reporter:datatype="org_unit"/>
10853                         <field name="original_value" reporter:datatype="text"/>
10854                         <field name="new_value" reporter:datatype="text"/>
10855                         <field name="field_name" reporter:datatype="link"/>
10856                 </fields>
10857                 <links>
10858                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10859                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10860                 </links>
10861                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10862                         <actions>
10863                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10864                                 <retrieve/>
10865                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10866                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10867                         </actions>
10868                 </permacrud>
10869         </class>
10870         <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">
10871                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10872                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10873                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10874                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10875                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10876                 </fields>
10877                 <links>
10878                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10879                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10880                 </links>
10881         </class>
10882         <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">
10883                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10884                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10885                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10886                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10887                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10888                 </fields>
10889                 <links>
10890                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10891                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10892                 </links>
10893         </class>
10894         <class id="cfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group" oils_persist:tablename="config.floating_group" reporter:label="Floating Group">
10895                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
10896                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10897                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10898                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
10899                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
10900                 </fields>
10901                 <links>
10902                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
10903                 </links>
10904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10905                         <actions>
10906                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10907                                 <retrieve/>
10908                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10909                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10910                         </actions>
10911                 </permacrud>
10912         </class>
10913         <class id="cfgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group_member" oils_persist:tablename="config.floating_group_member" reporter:label="Floating Group Members">
10914                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
10915                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10916                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
10917                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
10918                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
10919                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
10920                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
10921                 </fields>
10922                 <links>
10923                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
10924                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
10925                 </links>
10926                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10927                         <actions>
10928                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10929                                 <retrieve/>
10930                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10931                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10932                         </actions>
10933                 </permacrud>
10934         </class>
10935
10936         <!-- ********************************************************************************************************************* -->
10937
10938 </IDL>
10939
10940 <!--
10941     vim:noet:ts=4:sw=4:
10942 -->