]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
QueryParser Driver: Remove Unphrases, add negates
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                 </fields>
85                 <links>
86                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
87                 </links>
88         </class>
89
90         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
91                 <fields>
92                         <field name="workstation" oils_persist:virtual="true" />
93                         <field name="cash_payment" oils_persist:virtual="true" />
94                         <field name="check_payment" oils_persist:virtual="true" />
95                         <field name="credit_card_payment" oils_persist:virtual="true" />
96                 </fields>
97                 <links>
98                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
99                 </links>
100         </class>
101
102         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
103                 <fields>
104                         <field name="id" oils_persist:virtual="true" />
105                         <field name="children" oils_persist:virtual="true" />
106                         <field name="owner_doc" oils_persist:virtual="true" />
107                         <field name="intra_doc_id" oils_persist:virtual="true" />
108                         <field name="parent_node" oils_persist:virtual="true" />
109                         <field name="node_type" oils_persist:virtual="true" />
110                         <field name="namespace_uri" oils_persist:virtual="true" />
111                         <field name="name" oils_persist:virtual="true" />
112                         <field name="value" oils_persist:virtual="true" />
113                 </fields>
114         </class>
115
116         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
117                 <fields>
118                         <field name="title" oils_persist:virtual="true" />
119                         <field name="author" oils_persist:virtual="true" />
120                         <field name="doc_id" oils_persist:virtual="true" />
121                         <field name="doc_type" oils_persist:virtual="true" />
122                         <field name="pubdate" oils_persist:virtual="true" />
123                         <field name="isbn" oils_persist:virtual="true" />
124                         <field name="publisher" oils_persist:virtual="true" />
125                         <field name="tcn" oils_persist:virtual="true" />
126                         <field name="subject" oils_persist:virtual="true" />
127                         <field name="types_of_resource" oils_persist:virtual="true" />
128                         <field name="call_numbers" oils_persist:virtual="true" />
129                         <field name="edition" oils_persist:virtual="true" />
130                         <field name="online_loc" oils_persist:virtual="true" />
131                         <field name="synopsis" oils_persist:virtual="true" />
132                         <field name="physical_description" oils_persist:virtual="true" />
133                         <field name="toc" oils_persist:virtual="true" />
134                         <field name="copy_count" oils_persist:virtual="true" />
135                         <field name="series" oils_persist:virtual="true" />
136                         <field name="serials" oils_persist:virtual="true" />
137                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
142                 <fields>
143                         <field name="err_msg" oils_persist:virtual="true" />
144                         <field name="type" oils_persist:virtual="true" />
145                 </fields>
146         </class>
147
148         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
149                 <fields>
150                         <field name="err_msg" oils_persist:virtual="true" />
151                         <field name="type" oils_persist:virtual="true" />
152                 </fields>
153         </class>
154
155         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
156                 <fields oils_persist:primary="matchpoint">
157                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
158                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
159                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
160                 </fields>
161                 <links>
162                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
163                 </links>
164         </class>
165
166         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
167         <!-- when the time is right, turn me into a view.  -->
168                 <fields>
169             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
170             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
171             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
172             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
174             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
176             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
178             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
179                 </fields>
180         </class>
181
182         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
183                 <fields>
184                         <field name="public_name" oils_persist:virtual="true" />
185                         <field name="target_url" oils_persist:virtual="true" />
186                         <field name="target_coverage" oils_persist:virtual="true" />
187                         <field name="target_embargo" oils_persist:virtual="true" />
188                 </fields>
189         </class>
190
191         <!-- Actually in the DB -->
192         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
193                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
194                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
195                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
196                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
197                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
198                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
199                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
200                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
201                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
202                 </fields>
203                 <links>
204                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
205                 </links>
206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
207                         <actions>
208                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
209                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
210                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
211                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
212                         </actions>
213                 </permacrud>
214         </class>
215
216         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
217                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
218                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
219                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
220                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
221                 </fields>
222                 <links>
223                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
224                 </links>
225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
226                         <actions>
227                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
228                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
229                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
230                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
231                         </actions>
232                 </permacrud>
233         </class>
234
235         <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">
236                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
237                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
238                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
239                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
240                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
241                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
242                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
243                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
244                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
245                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
246                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
247                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
248                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
249                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
250                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
251                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
252                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
253                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
254                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
255                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
256                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
257                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
258                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
259                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
260                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
261                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
262                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
263                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
264                 </fields>
265                 <links>
266                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
267                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
268                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
269                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
270                 </links>
271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
272                         <actions>
273                                 <create permission="CREATE_IMPORT_ITEM">
274                     <context link="definition" field="owner"/>
275                                 </create>
276                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
277                     <context link="definition" field="owner"/>
278                                 </retrieve>
279                                 <update permission="UPDATE_IMPORT_ITEM">
280                     <context link="definition" field="owner"/>
281                                 </update>
282                                 <delete permission="DELETE_IMPORT_ITEM">
283                     <context link="definition" field="owner"/>
284                                 </delete>
285                         </actions>
286                 </permacrud>
287         </class>
288
289         <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">
290                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
291                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
292                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
293                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
294                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
295                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
296                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
297                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
298                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
299                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
300                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
301                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
302                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
303                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
304                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
305                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
306                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
307                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
308                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
309                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
310                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
311                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
312                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
313                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
314                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
315                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
316                 </fields>
317                 <links>
318                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
319                 </links>
320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
321                         <actions>
322                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
323                                 <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"/>
324                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
325                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
326                         </actions>
327                 </permacrud>
328         </class>
329
330         <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">
331                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
332                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
333                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
334                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
335                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
336                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
337                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
338                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
339                 </fields>
340                 <links>
341                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
342                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
343                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
344                 </links>
345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
346                         <actions>
347                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
348                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
349                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
350                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
351                         </actions>
352                 </permacrud>
353         </class>
354
355         <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">
356                 <fields oils_persist:primary="code">
357                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
358                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
359                 </fields>
360                 <links>
361                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
362                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
363                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
364                 </links>
365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
366                         <actions>
367                                 <retrieve/>
368                         </actions>
369                 </permacrud>
370         </class>
371
372         <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">
373                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
374                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
375                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
376                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
377                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
378                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
379                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
380                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
381                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
382                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
383                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
384                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
385                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
386                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
387                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
388                 </fields>
389                 <links>
390                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
391                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
392                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
393                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
394             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
395             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
396             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
397                 </links>
398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
399                         <actions>
400                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
401                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
402                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
403                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
404                         </actions>
405                 </permacrud>
406         </class>
407
408         <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">
409                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
410                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
411                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
412                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
413                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
414                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
415                 </fields>
416                 <links/>
417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
418                         <actions>
419                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
420                 <retrieve/>
421                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
422                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
423                         </actions>
424                 </permacrud>
425         </class>
426
427         <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">
428                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
429                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
430                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
431                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
432                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
433                 </fields>
434                 <links>
435                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
436                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
437                 </links>
438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
439                         <actions>
440                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
441                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
442                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
443                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
444                         </actions>
445                 </permacrud>
446         </class>
447
448         <class id="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">
449                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
450                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
451                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
452                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
453                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
454                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
455                 </fields>
456                 <links>
457                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
458                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
459                 </links>
460                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
461                         <actions>
462                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
463                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
464                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
465                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
466                         </actions>
467                 </permacrud>
468         </class>
469
470         <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">
471                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
472                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
473                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
474                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
475                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
476                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
477                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
478                 </fields>
479                 <links>
480                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
481                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
482                 </links>
483                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
484                         <actions>
485                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
486                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
487                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
488                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
489                         </actions>
490                 </permacrud>
491         </class>
492
493         <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">
494                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
495                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
496                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
497                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
498                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
499                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
500                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
501                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
502                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
503                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
504                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
505                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
506                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
507                 </fields>
508                 <links>
509                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
510                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
511                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
512             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
513             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
514                 </links>
515                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
516                         <actions>
517                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
518                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
519                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
520                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
521                         </actions>
522                 </permacrud>
523         </class>
524
525         <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">
526                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
527                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
528                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
529                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
530                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
531                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
532                 </fields>
533                 <links/>
534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
535                         <actions>
536                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
537                 <retrieve/>
538                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
539                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
540                         </actions>
541                 </permacrud>
542         </class>
543
544         <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">
545                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
546                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
547                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
548                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
549                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
550                 </fields>
551                 <links>
552                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
553                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
554                 </links>
555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
556                         <actions>
557                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
558                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
559                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
560                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
561                         </actions>
562                 </permacrud>
563         </class>
564
565         <class id="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">
566                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
567                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
568                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
569                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
570                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
571                 </fields>
572                 <links>
573                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
574                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
575                 </links>
576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
577                         <actions>
578                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
579                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
580                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
581                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
582                         </actions>
583                 </permacrud>
584         </class>
585
586         <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">
587                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
588                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
589                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
590                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
591                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
592                 </fields>
593                 <links>
594                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
595                 </links>
596                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
597                         <actions>
598                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
599                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
600                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
601                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
602                         </actions>
603                 </permacrud>
604         </class>
605
606         <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">
607                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
608                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
609                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
610                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
611                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
612                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
613                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
614                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
615             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
616                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
617                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
618                 </fields>
619                 <links>
620                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
621                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
622                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
623                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
624                 </links>
625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
626                         <actions>
627                                 <create permission="ADMIN_IMPORT_MATCH_SET">
628                     <context link="match_set" field="owner"/>
629                                 </create>
630                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
631                     <context link="match_set" field="owner"/>
632                                 </retrieve>
633                                 <update permission="ADMIN_IMPORT_MATCH_SET">
634                     <context link="match_set" field="owner"/>
635                                 </update>
636                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
637                     <context link="match_set" field="owner"/>
638                                 </delete>
639                         </actions>
640                 </permacrud>
641         </class>
642
643         <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">
644                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
645                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
646                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
647                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
648                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
649                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
650                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
651                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
652                 </fields>
653                 <links>
654                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
655                 </links>
656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
657                         <actions>
658                                 <create permission="ADMIN_IMPORT_MATCH_SET">
659                     <context link="match_set" field="owner"/>
660                                 </create>
661                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
662                     <context link="match_set" field="owner"/>
663                                 </retrieve>
664                                 <update permission="ADMIN_IMPORT_MATCH_SET">
665                     <context link="match_set" field="owner"/>
666                                 </update>
667                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
668                     <context link="match_set" field="owner"/>
669                                 </delete>
670                         </actions>
671                 </permacrud>
672         </class>
673
674         <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">
675                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
676                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
677                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
678                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
679                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
680                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
681                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
682                 </fields>
683                 <links>
684                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
685                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
686                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
687                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
688                 </links>
689         </class>
690
691     <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">
692         <fields oils_persist:primary="name">
693             <field reporter:label="Name" name="name" reporter:datatype="text"/>
694             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
695             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
696             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
697         </fields>
698         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
699             <actions>
700                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
701                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
702                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
703                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
704             </actions>
705         </permacrud>
706     </class>
707
708     <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">
709         <fields oils_persist:primary="id">
710             <field reporter:label="ID" name="id" reporter:datatype="id"/>
711             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
712             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
713             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
714             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
715         </fields>
716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
717             <actions>
718                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
719                 <retrieve/>
720                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
721                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
722             </actions>
723         </permacrud>
724     </class>
725
726         <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">
727                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
728                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
729                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
730                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
731                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
732                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
733                 </fields>
734                 <links>
735                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
736                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
737                 </links>
738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
739             <actions>
740                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
741                 <retrieve/>
742                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
743                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
744             </actions>
745         </permacrud>
746         </class>
747
748         <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">
749                 <fields oils_persist:primary="name">
750                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
751                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
752                         <field reporter:label="Description" name="description" reporter:datatype="text" />
753                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
754                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
755                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
756                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
757                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
758                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
759                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
760                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
761                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
762                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
763                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
764                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
765                 </fields>
766                 <links>
767                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
768                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
769                 </links>
770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
771             <actions>
772                 <create permission="ADMIN_SVF" global_required="true"/>
773                 <retrieve/>
774                 <update permission="ADMIN_SVF" global_required="true"/>
775                 <delete permission="ADMIN_SVF" global_required="true"/>
776             </actions>
777         </permacrud>
778         </class>
779
780         <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">
781                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
782                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
783                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
784                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
785             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
786                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
787                 </fields>
788                 <links/>
789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790             <actions>
791                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
792                 <retrieve/>
793                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
794                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
795             </actions>
796         </permacrud>
797         </class>
798
799         <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">
800                 <fields oils_persist:primary="id">
801                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
802                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
803                 </fields>
804                 <links>
805                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
806                 </links>
807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
808             <actions>
809                 <retrieve/>
810             </actions>
811         </permacrud>
812         </class>
813
814         <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">
815                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
816                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
817                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
818                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
819                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
820                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
821                 </fields>
822                 <links>
823                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
824                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
825                 </links>
826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
827             <actions>
828                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
829                 <retrieve/>
830                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
831                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
832             </actions>
833         </permacrud>
834         </class>
835
836         <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">
837                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
838                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
839                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
840                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
841                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
842                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
843                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
844                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
845             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
846                 </fields>
847                 <links>
848                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
849                 </links>
850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
851             <actions>
852                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
853                 <retrieve/>
854                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
855                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
856             </actions>
857         </permacrud>
858         </class>
859
860         <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">
861                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
862                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
863                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
864                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
865                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
866                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
867                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
868                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
869                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
870                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
871                 </fields>
872                 <links>
873                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
874                 </links>
875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
876             <actions>
877                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
878                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
879                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
880                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
881             </actions>
882         </permacrud>
883         </class>
884
885     <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">
886         <fields oils_persist:primary="name">
887             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
888             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
889             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
890             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
891             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
892             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
893             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
894             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
895             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
896             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
897         </fields>
898         <links>
899             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
900             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
901         </links>
902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
903             <actions>
904                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
905                 <retrieve/>
906                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
907                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
908             </actions>
909         </permacrud>
910     </class>
911
912     <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">
913         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
914             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
915             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
916             <field reporter:label="Name" name="name" reporter:datatype="text"/>
917             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
918             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
919             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
920             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
921         </fields>
922         <links>
923             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
924         </links>
925         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
926             <actions>
927                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
928                 <retrieve/>
929                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
930                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
931             </actions>
932         </permacrud>
933     </class>
934
935         <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">
936                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
937                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
938                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
939                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
940                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
941                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
942                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
943                 </fields>
944                 <links>
945             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
946             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
947                 </links>
948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
949                         <actions>
950                                 <retrieve/>
951                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
952                         </actions>
953                 </permacrud>
954         </class>
955
956         <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">
957                 <fields oils_persist:primary="key">
958                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
959                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
960                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
961                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
962                 </fields>
963                 <links/>
964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
965                         <actions>
966                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
967                                 <retrieve/>
968                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
969                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
970                         </actions>
971                 </permacrud>
972         </class>
973
974         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
975                 <fields oils_persist:primary="module">
976                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
977                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
978                 </fields>
979                 <links/>
980         </class>
981
982         <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">
983                 <fields oils_persist:primary="module">
984                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
985                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
986                 </fields>
987                 <links/>
988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
989                         <actions>
990                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
991                                 <retrieve/>
992                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
993                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
994                         </actions>
995                 </permacrud>
996         </class>
997
998         <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">
999                 <fields oils_persist:primary="module">
1000                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1001                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1002                 </fields>
1003                 <links/>
1004                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1005                         <actions>
1006                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1007                                 <retrieve/>
1008                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1009                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1010                         </actions>
1011                 </permacrud>
1012         </class>
1013
1014         <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">
1015                 <fields oils_persist:primary="module">
1016                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1017                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1018                 </fields>
1019                 <links/>
1020                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1021                         <actions>
1022                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1023                                 <retrieve/>
1024                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1025                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1026                         </actions>
1027                 </permacrud>
1028         </class>
1029
1030         <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">
1031                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1032                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1033                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1034                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1035                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1036                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1037                 </fields>
1038                 <links>
1039                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1040                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1041                 </links>
1042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1043                         <actions>
1044                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1045                     <context link="event_def" field="owner"/>
1046                 </create>
1047                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1048                     <context link="event_def" field="owner"/>
1049                 </retrieve>
1050                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1051                     <context link="event_def" field="owner"/>
1052                 </update>
1053                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1054                     <context link="event_def" field="owner"/>
1055                 </delete>
1056                         </actions>
1057                 </permacrud>
1058         </class>
1059
1060         <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">
1061                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1062                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1063                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1064                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1065                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1066                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1067                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1068                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1069                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1070                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1071                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1072                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1073                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1074                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1075                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1076                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1077                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1078                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1079                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1080                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1081                 </fields>
1082                 <links>
1083                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1084                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1085                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1086                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1087                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1088                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1089                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1090                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1091                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1092                 </links>
1093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1094                         <actions>
1095                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1096                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1097                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1098                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1099                         </actions>
1100                 </permacrud>
1101         </class>
1102
1103         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1104                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1105                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1106                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1107                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1108                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1109                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1110                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1111                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1112                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1113                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1114                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1115                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1116                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1117                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1118                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1119                 </fields>
1120                 <links>
1121                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1122                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1123                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1124                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1125                 </links>
1126         </class>
1127
1128         <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">
1129                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1130                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1131                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1132                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1133                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1134                 </fields>
1135                 <links>
1136                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1137                 </links>
1138                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1139                         <actions>
1140                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1141                     <context link="event_def" field="owner"/>
1142                 </create>
1143                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1144                     <context link="event_def" field="owner"/>
1145                 </retrieve>
1146                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1147                     <context link="event_def" field="owner"/>
1148                 </update>
1149                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1150                     <context link="event_def" field="owner"/>
1151                 </delete>
1152                         </actions>
1153                 </permacrud>
1154         </class>
1155
1156         <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">
1157                 <oils_persist:source_definition><![CDATA[
1158                 SELECT  atevdef.hook,
1159                         atevdef.name,
1160                         atevdef.reactor,
1161                         atev.id,
1162                         atev.event_def,
1163                         atev.add_time,
1164                         atev.run_time,
1165                         atev.start_time,
1166                         atev.update_time,
1167                         atev.complete_time,
1168                         atev.update_process,
1169                         atev.state,
1170                         atev.user_data,
1171                         atev.template_output,
1172                         atev.error_output,
1173                         atev.async_output,
1174                         targ_circ.id AS target_circ,
1175                         targ_ahr.id AS target_hold,
1176                         COALESCE(
1177                                 targ_circ.circ_lib,
1178                                 targ_ahr.pickup_lib
1179                         ) AS perm_lib
1180                 FROM action_trigger.event atev
1181                 JOIN action_trigger.event_definition atevdef ON
1182                         (atevdef.id = atev.event_def)
1183                 JOIN action_trigger.hook ath ON
1184                         (ath.key = atevdef.hook)
1185                 LEFT JOIN action.circulation targ_circ ON
1186                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1187                 LEFT JOIN action.hold_request targ_ahr ON
1188                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1189                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1190                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1191                                 'circ.staff.max_visible_event_age',
1192                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1193                         ) UNION
1194                         SELECT '1000 YEARS'::INTERVAL AS value
1195                 ) ous)
1196                 ]]></oils_persist:source_definition>
1197                 <fields oils_persist:primary="id">
1198                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1199                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1200                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1201                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1202                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1203                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1204                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1205                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1206                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1207                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1208                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1209                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1210                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1211                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1212                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1213                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1214                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1215                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1216                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1217                 </fields>
1218                 <links>
1219                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1220                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1221                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1222                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1223                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1224                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1225                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1226                 </links>
1227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1228                         <actions>
1229                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1230                         </actions>
1231                 </permacrud>
1232         </class>
1233
1234         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1235                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1236                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1237                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1238                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1239                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1240                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1241                 </fields>
1242                 <links>
1243                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1244                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1245                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1246                 </links>
1247         </class>
1248
1249         <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">
1250                 <fields oils_persist:primary="code">
1251                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1252                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1253                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1254                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1255                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1256                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1257                 </fields>
1258                 <links/>
1259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1260             <actions>
1261                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1262                 <retrieve/>
1263                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1264                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1265             </actions>
1266         </permacrud>
1267         </class>
1268
1269         <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">
1270                 <fields oils_persist:primary="code">
1271                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1272                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1273                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1274                 </fields>
1275                 <links/>
1276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1277             <actions>
1278                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1279                 <retrieve/>
1280                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1281                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1282             </actions>
1283         </permacrud>
1284         </class>
1285
1286         <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">
1287                 <fields oils_persist:primary="code">
1288                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1289                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1290                 </fields>
1291                 <links/>
1292         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1293             <actions>
1294                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1295                 <retrieve/>
1296                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1297                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1298             </actions>
1299         </permacrud>
1300         </class>
1301
1302         <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">
1303                 <fields oils_persist:primary="code">
1304                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1305                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1306                 </fields>
1307                 <links/>
1308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1309             <actions>
1310                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1311                 <retrieve/>
1312                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1313                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1314             </actions>
1315         </permacrud>
1316         </class>
1317
1318         <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">
1319                 <fields oils_persist:primary="code">
1320                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1321                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1322                 </fields>
1323                 <links/>
1324         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1325             <actions>
1326                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1327                 <retrieve/>
1328                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1329                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1330             </actions>
1331         </permacrud>
1332         </class>
1333
1334         <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">
1335                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1336                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1337                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1338                 </fields>
1339                 <links/>
1340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1341             <actions>
1342                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1343                 <retrieve/>
1344                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1345                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1346             </actions>
1347         </permacrud>
1348         </class>
1349
1350         <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">
1351                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1352                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1353                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1354                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1355                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1356                 </fields>
1357         <links>
1358             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1359             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1360             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1361         </links>
1362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1363             <actions>
1364                 <create permission="UPDATE_COPY">
1365                     <context link="target_copy" field="circ_lib"/>
1366                 </create>
1367                 <retrieve/>
1368                 <update permission="UPDATE_COPY">
1369                     <context link="target_copy" field="circ_lib"/>
1370                 </update>
1371                 <delete permission="UPDATE_COPY">
1372                     <context link="target_copy" field="circ_lib"/>
1373                 </delete>
1374             </actions>
1375         </permacrud>
1376         </class>
1377
1378         <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">
1379                 <fields oils_persist:primary="code">
1380                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1381                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1382                 </fields>
1383                 <links/>
1384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1385             <actions>
1386                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1387                 <retrieve/>
1388                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1389                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1390             </actions>
1391         </permacrud>
1392         </class>
1393
1394         <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">
1395                 <fields oils_persist:primary="code">
1396                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1397                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1398                 </fields>
1399                 <links/>
1400         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1401             <actions>
1402                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1403                 <retrieve/>
1404                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1405                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1406             </actions>
1407         </permacrud>
1408         </class>
1409
1410         <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">
1411                 <fields oils_persist:primary="code">
1412                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1413                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1414                 </fields>
1415                 <links/>
1416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1417             <actions>
1418                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1419                 <retrieve/>
1420                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1421                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1422             </actions>
1423         </permacrud>
1424         </class>
1425
1426     <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">
1427         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1428             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1429             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1430             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1431             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1432             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1433             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1434             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1435             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1436             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1437             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1438             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1439             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1440             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1441             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1442             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1443             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1444             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1445         </fields>
1446         <links/>
1447         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1448             <actions>
1449                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1450                 <retrieve/>
1451                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1452                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1453             </actions>
1454         </permacrud>
1455     </class>
1456
1457     <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">
1458         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1459             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1460             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1461             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1462             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1463             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1464             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1465             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1466             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1467             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1468             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1469             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1470             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1471             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1472             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1473             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1474             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1475             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1476             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1477             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1478         </fields>
1479         <links/>
1480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1481             <actions>
1482                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1483                 <retrieve/>
1484                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1485                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1486             </actions>
1487         </permacrud>
1488     </class>
1489
1490     <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">
1491         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1492             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1493             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1494             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1495             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1496             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1497         </fields>
1498         <links>
1499             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1500             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1501             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1502         </links>
1503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1504             <actions>
1505                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1506                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1507                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1508                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1509             </actions>
1510         </permacrud>
1511     </class>
1512
1513         <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">
1514                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1515                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1516                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1517                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1518                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1519                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1520                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1521                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1522                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1523                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1524                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1525                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1526                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1527                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1528                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1529                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1530                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1531             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1532                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1533                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1534                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1535                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1536                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1537                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1538                 </fields>
1539                 <links>
1540                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1541                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1542                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1543                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1544                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1545                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1546                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1547                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1548                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1549                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1550                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1551                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1552                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1553             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1554                 </links>
1555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1556             <actions>
1557                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1558                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1559                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1560                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1561             </actions>
1562         </permacrud>
1563         </class>
1564
1565         <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">
1566                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1567                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1568                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1569                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1570                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1571                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1572                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1573                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1574                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1575                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1576                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1577                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1578                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1579                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1580                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1581                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1582             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1583                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1584                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1585             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1586                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1587                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1588                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1589                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1590             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1591             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1592             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1593                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1594                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1595                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1596                 </fields>
1597                 <links>
1598                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1599                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1600                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1601                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1602                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1603                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1604                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1605                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1606                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1607                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1608                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1609                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1610                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1611                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1612             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1613                 </links>
1614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1615             <actions>
1616                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1617                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1618                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1619                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1620             </actions>
1621         </permacrud>
1622         </class>
1623
1624     <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">
1625         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1626             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1627             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1628             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1629         </fields>
1630         <links/>
1631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1632             <actions>
1633                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1634                 <retrieve/>
1635                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1636                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1637             </actions>
1638         </permacrud>
1639     </class>
1640
1641     <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">
1642         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1643             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1644             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1645             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1646             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1647             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1648             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1649             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1650         </fields>
1651         <links>
1652             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1653         </links>
1654         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1655             <actions>
1656                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1657                 <retrieve/>
1658                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1659                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1660             </actions>
1661         </permacrud>
1662     </class>
1663
1664     <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">
1665         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1666             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1667             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1668             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1669             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1670             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1671         </fields>
1672         <links>
1673             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1674             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1675         </links>
1676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1677             <actions>
1678                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1679                     <context link="matchpoint" field="org_unit"/>
1680                 </create>
1681                 <retrieve/>
1682                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1683                     <context link="matchpoint" field="org_unit"/>
1684                 </update>
1685                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1686                     <context link="matchpoint" field="org_unit"/>
1687                 </delete>
1688             </actions>
1689         </permacrud>
1690     </class>
1691
1692     <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">
1693         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1694             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1695             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1696             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1697         </fields>
1698         <links>
1699             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1700             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1701         </links>
1702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1703             <actions>
1704                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1705                     <context link="limit_set" field="owning_lib"/>
1706                 </create>
1707                 <retrieve/>
1708                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1709                     <context link="limit_set" field="owning_lib"/>
1710                 </update>
1711                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1712                     <context link="limit_set" field="owning_lib"/>
1713                 </delete>
1714             </actions>
1715         </permacrud>
1716     </class>
1717     <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">
1718         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1719             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1720             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1721             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1722         </fields>
1723         <links>
1724             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1725             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1726         </links>
1727         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1728             <actions>
1729                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1730                     <context link="limit_set" field="owning_lib"/>
1731                 </create>
1732                 <retrieve/>
1733                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1734                     <context link="limit_set" field="owning_lib"/>
1735                 </update>
1736                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1737                     <context link="limit_set" field="owning_lib"/>
1738                 </delete>
1739             </actions>
1740         </permacrud>
1741     </class>
1742
1743     <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">
1744         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1745             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1746             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1747             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1748             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1749         </fields>
1750         <links>
1751             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1752             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1753         </links>
1754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1755             <actions>
1756                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1757                     <context link="limit_set" field="owning_lib"/>
1758                 </create>
1759                 <retrieve/>
1760                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1761                     <context link="limit_set" field="owning_lib"/>
1762                 </update>
1763                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1764                     <context link="limit_set" field="owning_lib"/>
1765                 </delete>
1766             </actions>
1767         </permacrud>
1768     </class>
1769
1770         <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">
1771                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1772                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1773                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1774                 </fields>
1775                 <links/>
1776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1777             <actions>
1778                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1779                 <retrieve/>
1780                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1781                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1782             </actions>
1783         </permacrud>
1784         </class>
1785
1786         <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">
1787                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1788                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1789                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1790                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1791                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1792                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1793                 </fields>
1794                 <links>
1795                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1796                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1797                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1798                 </links>
1799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1800             <actions>
1801                 <create permission="ADMIN_SURVEY">
1802                     <context link="survey" field="owner"/>
1803                 </create>
1804                 <retrieve/>
1805                 <update permission="ADMIN_SURVEY">
1806                     <context link="survey" field="owner"/>
1807                 </update>
1808                 <delete permission="ADMIN_SURVEY">
1809                     <context link="survey" field="owner"/>
1810                 </delete>
1811             </actions>
1812         </permacrud>
1813         </class>
1814         <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">
1815                 <fields oils_persist:primary="id" oils_persist:sequence="">
1816                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1817                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1818                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1819                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1820                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1821                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1822                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1823                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1824                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1825                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1826                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1827                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1828                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1829                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1830                 </fields>
1831                 <links>
1832                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1833                 </links>
1834         </class>
1835         <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">
1836                 <fields oils_persist:primary="id" oils_persist:sequence="">
1837                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1838                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1839                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1840                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1841                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1842                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1843                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1844                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1845                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1846                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1847                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1848                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1849                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1850                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1851                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1852                 </fields>
1853                 <links>
1854                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1855                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1856                 </links>
1857         </class>
1858         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1859                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1860                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1861                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1862                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1863                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1864                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1865                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1866                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1867                 </fields>
1868                 <links>
1869                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1870                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1871                 </links>
1872         </class>
1873         <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">
1874                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1875                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1876                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1877                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1878                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1879                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1880                 </fields>
1881                 <links>
1882                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1883                 </links>
1884         </class>
1885         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1886                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1887                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1888                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1889                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1890                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1891                 </fields>
1892                 <links>
1893                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1894                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1895                 </links>
1896         </class>
1897         <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">
1898                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1899                         <field name="field" reporter:datatype="link"/>
1900                         <field name="id" reporter:datatype="id" />
1901                         <field name="source" reporter:datatype="link"/>
1902                         <field name="value" reporter:datatype="text"/>
1903                 </fields>
1904                 <links>
1905                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1906                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1907                 </links>
1908         </class>
1909         <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">
1910                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1911                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1912                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1913                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1914                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1915                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1916                 </fields>
1917                 <links>
1918                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1919                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1920                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1921                 </links>
1922         </class>
1923         <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">
1924                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1925                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1926                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1927                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1928                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1929                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1930                 </fields>
1931                 <links>
1932                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1933                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1934                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1935                 </links>
1936         </class>
1937         <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">
1938                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1939                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1940                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1941                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1942                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1943                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1944                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1945                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1946                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1947                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1948                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1949                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1950                 </fields>
1951                 <links>
1952                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1953                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1954                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1955                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1956                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1957                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1958                 </links>
1959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1960             <actions>
1961                 <create permission="TRANSIT_COPY" context_field="owner">
1962                     <context link="target_copy" field="circ_lib"/>
1963                 </create>
1964                 <retrieve/>
1965                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1966                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1967             </actions>
1968         </permacrud>
1969         </class>
1970         <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">
1971                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1972                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1973                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1974                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1975                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1976                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1977                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1978                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1979                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1980                 </fields>
1981                 <links>
1982                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1983                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1984                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1985                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1986                 </links>
1987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1988             <actions>
1989                 <create permission="ADMIN_SURVEY">
1990                     <context link="survey" field="owner"/>
1991                 </create>
1992                 <retrieve/>
1993                 <update permission="ADMIN_SURVEY">
1994                     <context link="survey" field="owner"/>
1995                 </update>
1996                 <delete permission="ADMIN_SURVEY">
1997                     <context link="survey" field="owner"/>
1998                 </delete>
1999             </actions>
2000         </permacrud>
2001         </class>
2002         <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">
2003                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2004                         <field name="bucket" />
2005                         <field name="id" reporter:datatype="id" />
2006                         <field name="target_copy" reporter:datatype="link"/>
2007                         <field name="create_time" reporter:datatype="timestamp" />
2008                         <field name="pos" reporter:datatype="int" />
2009                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2010                 </fields>
2011                 <links>
2012                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2013                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2014             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2015                 </links>
2016         </class>
2017         <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">
2018                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2019                         <field name="id" reporter:datatype="id" />
2020                         <field name="item" reporter:datatype="link"/>
2021                         <field name="note" reporter:datatype="text" />
2022                 </fields>
2023                 <links>
2024                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2025                 </links>
2026         </class>
2027
2028         <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">
2029                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2030                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2031                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2032                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2033                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2034                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2035                 </fields>
2036                 <links>
2037                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2038                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2039                 </links>
2040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2041                         <actions>
2042                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2043                                 <retrieve/>
2044                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2045                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2046                         </actions>
2047                 </permacrud>
2048         </class>
2049
2050         <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">
2051                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2052                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2053                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2054                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2055                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2056                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2057                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2058                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2059                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2060                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2061                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2062                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2063                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2064                 </fields>
2065                 <links>
2066                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2067                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2068                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2069                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2070                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2071                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2072                 </links>
2073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2074                         <actions>
2075                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2076                                 <retrieve/>
2077                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2078                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2079                         </actions>
2080                 </permacrud>
2081         </class>
2082
2083         <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">
2084                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2085                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2086                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2087                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2088                 </fields>
2089                 <links>
2090                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2091                 </links>
2092                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2093                         <actions>
2094                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2095                                 <retrieve/>
2096                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2097                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2098                         </actions>
2099                 </permacrud>
2100         </class>
2101
2102         <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">
2103                 <fields oils_persist:primary="code">
2104                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2105                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2106                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2107                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2108                 </fields>
2109                 <links>
2110                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2111                 </links>
2112                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2113                         <actions>
2114                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2115                                 <retrieve/>
2116                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2117                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2118                         </actions>
2119                 </permacrud>
2120         </class>
2121
2122         <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">
2123                 <fields oils_persist:primary="code">
2124                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2125                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2126                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2127                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2128                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2129                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2130                 </fields>
2131                 <links>
2132                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2133                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2134                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2135                 </links>
2136                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137                         <actions>
2138                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2139                                 <retrieve/>
2140                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2141                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2142                         </actions>
2143                 </permacrud>
2144         </class>
2145
2146     <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">
2147         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2148             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2149             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2150             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2151         </fields>
2152         <links>
2153             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2154             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2155         </links>
2156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2157             <actions>
2158                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2159                 <retrieve/>
2160                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2161                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2162             </actions>
2163         </permacrud>
2164     </class>
2165
2166         <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">
2167                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2168                         <field name="active" reporter:datatype="bool"/>
2169                         <field name="create_date" reporter:datatype="timestamp"/>
2170                         <field name="creator" />
2171                         <field name="deleted" reporter:datatype="bool"/>
2172                         <field name="edit_date" reporter:datatype="timestamp"/>
2173                         <field name="editor" />
2174                         <field name="id" reporter:datatype="id" />
2175                         <field name="last_xact_id" />
2176                         <field name="marc" />
2177                         <field name="source" />
2178                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2179                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2180                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2181                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2182                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2183                 </fields>
2184                 <links>
2185                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2186                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2187                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2188                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2189                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2190                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2191                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2192                 </links>
2193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2194                         <actions>
2195                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2196                                 <retrieve/>
2197                                 <update permission="UPDATE_MARC" global_required="true"/>
2198                                 <delete permission="UPDATE_MARC" global_required="true"/>
2199                         </actions>
2200                 </permacrud>
2201         </class>
2202         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2204                         <field name="char_encoding" />
2205                         <field name="id" />
2206                         <field name="record" />
2207                         <field name="record_status" />
2208                         <field name="thesaurus" />
2209                 </fields>
2210                 <links>
2211                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2212                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2213                 </links>
2214         </class>
2215         <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">
2216                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2217                         <field name="id" reporter:datatype="id" />
2218                         <field name="bib" reporter:datatype="link" />
2219                         <field name="authority" reporter:datatype="link" />
2220                 </fields>
2221                 <links>
2222                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2223                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2224                 </links>
2225         </class>
2226         <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">
2227                 <fields oils_persist:primary="code" oils_persist:sequence="">
2228                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2229                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2230                 </fields>
2231                 <links/>
2232         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2233             <actions>
2234                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2235                 <retrieve/>
2236                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2237                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2238             </actions>
2239         </permacrud>
2240         </class>
2241         <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">
2242                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2243                         <field name="accepting_usr" />
2244                         <field name="amount" reporter:datatype="money" />
2245                         <field name="amount_collected" reporter:datatype="money" />
2246                         <field name="approval_code" reporter:datatype="text"/>
2247                         <field name="cash_drawer" reporter:datatype="link"/>
2248                         <field name="cc_first_name" reporter:datatype="text"/>
2249                         <field name="cc_last_name" reporter:datatype="text"/>
2250                         <field name="cc_number" reporter:datatype="text"/>
2251                         <field name="cc_order_number" reporter:datatype="text"/>
2252                         <field name="cc_type" reporter:datatype="text"/>
2253                         <field name="cc_processor" reporter:datatype="text"/>
2254                         <field name="expire_month" reporter:datatype="int" />
2255                         <field name="expire_year" reporter:datatype="int" />
2256                         <field name="id" reporter:datatype="id" />
2257                         <field name="note" reporter:datatype="text"/>
2258                         <field name="payment_ts" reporter:datatype="timestamp"/>
2259                         <field name="xact" reporter:datatype="link"/>
2260                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2261                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2262                 </fields>
2263                 <links>
2264                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2265                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2266                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2267                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2268                 </links>
2269         </class>
2270         <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">
2271                 <fields oils_persist:primary="name">
2272                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2273                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2274                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2275                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2276                 </fields>
2277                 <links/>
2278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2279             <actions>
2280                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2281                 <retrieve/>
2282                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2283                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2284             </actions>
2285         </permacrud>
2286         </class>
2287
2288         <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">
2289                 <fields oils_persist:primary="alias">
2290                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2291                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2292                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2293                 </fields>
2294                 <links>
2295                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2296                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2297                 </links>
2298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2299             <actions>
2300                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2301                 <retrieve/>
2302                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2303                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2304             </actions>
2305         </permacrud>
2306         </class>
2307
2308         <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">
2309                 <fields oils_persist:primary="name">
2310                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2311                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2312                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2313                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2314                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2315                 </fields>
2316                 <links>
2317                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2318                 </links>
2319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2320             <actions>
2321                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2322                 <retrieve/>
2323                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2324                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2325             </actions>
2326         </permacrud>
2327         </class>
2328
2329         <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">
2330                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2331                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2332                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2333                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2334                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2335                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2336                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2337                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2338                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2339                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2340                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2341                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2342                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2343                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2344                 </fields>
2345                 <links>
2346                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2347                 </links>
2348         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2349             <actions>
2350                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2351                 <retrieve/>
2352                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2353                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2354             </actions>
2355         </permacrud>
2356         </class>
2357         <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">
2358                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2359                         <field name="id" reporter:datatype="id" />
2360                         <field name="name" reporter:datatype="text"/>
2361                         <field name="xpath" reporter:datatype="text"/>
2362                         <field name="format" reporter:datatype="link"/>
2363                         <field name="first_word" reporter:datatype="bool" />
2364                 </fields>
2365                 <links/>
2366         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2367             <actions>
2368                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2369                 <retrieve/>
2370                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2371                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2372             </actions>
2373         </permacrud>
2374         </class>
2375         <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">
2376                 <fields oils_persist:primary="code" oils_persist:sequence="">
2377                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2378                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2379                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2380                 </fields>
2381                 <links/>
2382         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2383             <actions>
2384                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2385                 <retrieve/>
2386                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2387                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2388             </actions>
2389         </permacrud>
2390         </class>
2391         <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">
2392                 <fields oils_persist:primary="code" oils_persist:sequence="">
2393                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2394                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2395                 </fields>
2396                 <links/>
2397         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2398             <actions>
2399                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2400                 <retrieve/>
2401                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2402                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2403             </actions>
2404         </permacrud>
2405         </class>
2406     <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">
2407         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2408             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2409             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2410             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2411             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2412         </fields>
2413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2414             <actions>
2415                 <retrieve/>
2416             </actions>
2417         </permacrud>
2418     </class>
2419         <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">
2420                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2421                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2422                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2423                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2424                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2425                 </fields>
2426                 <links>
2427                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2428                 </links>
2429         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2430             <actions>
2431                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2432                 <retrieve/>
2433                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2434                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2435             </actions>
2436         </permacrud>
2437         </class>
2438         <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">
2439                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2440                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2441                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2442                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2443                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2444                 </fields>
2445                 <links>
2446                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2447                 </links>
2448         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2449             <actions>
2450                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2451                 <retrieve/>
2452                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2453                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2454             </actions>
2455         </permacrud>
2456         </class>
2457         <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">
2458                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2459                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2460                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2461                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2462                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2463                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2464                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2465                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2466                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2467                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2468                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2469                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2470                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2471                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2472                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2473                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2474                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2475                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2476                 </fields>
2477                 <links>
2478                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2479                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2480                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2481                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2482                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2483                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2484                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2485                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2486                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2487                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2488                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2489                 </links>
2490         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2491             <actions>
2492                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2493                 <retrieve/>
2494                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2495                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2496             </actions>
2497         </permacrud>
2498         </class>
2499         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2500                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2501                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2502                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2503                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2504                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2505                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2506                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2507                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2508                 </fields>
2509                 <links>
2510                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2511                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2512         </links>
2513         </class>
2514         <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">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2516                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2517                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2518                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2519                 </fields>
2520                 <links>
2521                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2522                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2523                 </links>
2524         </class>
2525         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2526                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2527                         <field name="id" reporter:datatype="id" />
2528                         <field name="value" oils_persist:i18n="true" />
2529                 </fields>
2530                 <links/>
2531         </class>
2532         <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">
2533                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2534                         <field name="balance_owed" reporter:datatype="money" />
2535                         <field name="total_owed" reporter:datatype="money" />
2536                         <field name="total_paid" reporter:datatype="money" />
2537                         <field name="usr" reporter:datatype="link"/>
2538                 </fields>
2539                 <links>
2540                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2541         </links>
2542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2543             <actions>
2544                 <retrieve permission="VIEW_USER">
2545                     <context link="usr" field="home_ou"/>
2546                 </retrieve>
2547             </actions>
2548         </permacrud>
2549         </class>
2550         <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">
2551                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2552                         <field name="collector" />
2553                         <field name="enter_time" reporter:datatype="timestamp"/>
2554                         <field name="id" reporter:datatype="id" />
2555                         <field name="location" reporter:datatype="link"/>
2556                         <field name="usr" reporter:datatype="link"/>
2557                 </fields>
2558                 <links>
2559                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2560                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2561                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2562                 </links>
2563         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2564             <actions>
2565                 <create permission="money.collections_tracker.create" context_field="location"/>
2566                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2567                 <delete permission="money.collections_tracker.create" context_field="location"/>
2568             </actions>
2569         </permacrud>
2570         </class>
2571         <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">
2572                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2573                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2574                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2575                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2576                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2577                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2578                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2579                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2580                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2581                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2582                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2583                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2584                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2585                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2586                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2587                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2588                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2589                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2590                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2591                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2592                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2593                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2594                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2595                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2596                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2597                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2598                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2599                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2600                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2601                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2602                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2603                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2604                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2605                 </fields>
2606                 <links>
2607                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2608                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2609                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2610                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2611                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2612                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2613                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2614                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2615                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2616                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2617                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2618                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2619                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2620                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2621                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2622                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2623                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2624                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2625                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2626                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2627                 </links>
2628         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2629             <actions>
2630                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2631                 <retrieve/>
2632                 <update permission="UPDATE_MARC" global_required="true"/>
2633             </actions>
2634         </permacrud>
2635         </class>
2636         <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">
2637                 <fields oils_persist:primary="id">
2638                         <field name="dow_0_close" />
2639                         <field name="dow_0_open" />
2640                         <field name="dow_1_close" />
2641                         <field name="dow_1_open" />
2642                         <field name="dow_2_close" />
2643                         <field name="dow_2_open" />
2644                         <field name="dow_3_close" />
2645                         <field name="dow_3_open" />
2646                         <field name="dow_4_close" />
2647                         <field name="dow_4_open" />
2648                         <field name="dow_5_close" />
2649                         <field name="dow_5_open" />
2650                         <field name="dow_6_close" />
2651                         <field name="dow_6_open" />
2652                         <field name="id" reporter:datatype="id" />
2653                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2654                 </fields>
2655                 <links>
2656                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2657                 </links>
2658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2659             <actions>
2660                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2661                 <retrieve/>
2662                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2663                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2664             </actions>
2665         </permacrud>
2666         </class>
2667         <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">
2668                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2669                         <field name="id" reporter:datatype="id" />
2670                         <field name="record" reporter:datatype="link"/>
2671                         <field name="label" reporter:datatype="text"/>
2672                         <field name="label_sortkey" reporter:datatype="text"/>
2673                 </fields>
2674                 <links>
2675                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2676                 </links>
2677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2678             <actions>
2679                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2680                 <retrieve/>
2681                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2682                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2683             </actions>
2684         </permacrud>
2685         </class>
2686         <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">
2687                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2688                         <field name="id" reporter:datatype="id" />
2689                         <field name="target_copy" reporter:datatype="link" />
2690                         <field name="part" reporter:datatype="link"/>
2691                 </fields>
2692                 <links>
2693                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2694                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2695                 </links>
2696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2697             <actions>
2698                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2699                 <retrieve/>
2700                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2701                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2702             </actions>
2703         </permacrud>
2704         </class>
2705         <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">
2706                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2707                         <field name="close_end" reporter:datatype="timestamp" />
2708                         <field name="close_start" reporter:datatype="timestamp" />
2709                         <field name="id" reporter:datatype="id" />
2710                         <field name="org_unit" reporter:datatype="org_unit"/>
2711                         <field name="reason" reporter:datatype="text"/>
2712                 </fields>
2713                 <links>
2714                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2715                 </links>
2716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2717             <actions>
2718                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2719                 <retrieve/>
2720                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2721                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2722             </actions>
2723         </permacrud>
2724         </class>
2725         <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">
2726                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2727                         <field name="extended" reporter:datatype="interval"/>
2728                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2729                         <field name="max_renewals" reporter:datatype="int" />
2730                         <field name="name" reporter:datatype="text"/>
2731                         <field name="normal" reporter:datatype="interval"/>
2732                         <field name="shrt" reporter:datatype="interval"/>
2733                 </fields>
2734                 <links>
2735                 </links>
2736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2737             <actions>
2738                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2739                 <retrieve/>
2740                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2741                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2742             </actions>
2743         </permacrud>
2744         </class>
2745
2746         <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">
2747                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2748                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2749                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2750             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2751                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2752             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2753                 </fields>
2754                 <links>
2755             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2756                 </links>
2757                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2758             <actions>
2759                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2760                 <retrieve/>
2761                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2762                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2763             </actions>
2764                 </permacrud>
2765         </class>
2766
2767         <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">
2768                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2769                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2770                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2771                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2772             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2773                 </fields>
2774                 <links>
2775                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2776                 </links>
2777                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2778             <actions>
2779                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2780                 <retrieve/>
2781                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2782                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2783             </actions>
2784                 </permacrud>
2785         </class>
2786
2787         <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">
2788                 <fields oils_persist:primary="id" oils_persist:sequence="">
2789                         <field name="balance_owed" reporter:datatype="money"/>
2790                         <field name="id" reporter:datatype="id" />
2791                         <field name="last_billing_note" reporter:datatype="text"/>
2792                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2793                         <field name="last_billing_type" reporter:datatype="text"/>
2794                         <field name="last_payment_note" reporter:datatype="text"/>
2795                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2796                         <field name="last_payment_type" reporter:datatype="text"/>
2797                         <field name="total_owed" reporter:datatype="money"/>
2798                         <field name="total_paid" reporter:datatype="money"/>
2799                         <field name="usr" reporter:datatype="link"/>
2800                         <field name="xact_finish" reporter:datatype="timestamp" />
2801                         <field name="xact_start" reporter:datatype="timestamp" />
2802                         <field name="xact_type" reporter:datatype="text"/>
2803                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2804                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2805                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2806                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2807                         <field name="billing_location" reporter:datatype="link"/>
2808                 </fields>
2809                 <links>
2810                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2811                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2812                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2813                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2814                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2815                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2816                 </links>
2817         </class>
2818         <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">
2819                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2820                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2821                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2822                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2823                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2824                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2825                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2826                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2827                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2828                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2829                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2830                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2831                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2832                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2833                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2834                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2835                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2836                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2837                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2838                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2839                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2840                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2841                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2842                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2843                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2844                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2845                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2846                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2847                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2848                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2849                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2850                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2851                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2852                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2853                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2854                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2855                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2856                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2857                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2858                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2859                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2860                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2861                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2862                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2863                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2864                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2865                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2866                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2867                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2868                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2869                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2870                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2871                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2872                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2873                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2874                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2875                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2876                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2877                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2878                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2879                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2880                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2881                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2882                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2883                 </fields>
2884                 <links>
2885                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2886                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2887                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2888                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2889                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2890                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2891                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2892                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2893                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2894                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2895                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2896                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2897                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2898                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2899                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2900                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2901                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2902                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2903                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2904                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2905                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2906                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2907                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2908                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2909                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2910                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2911                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2912                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2913                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2914                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2915                 </links>
2916                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2917                         <actions>
2918                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
2919                         </actions>
2920                 </permacrud>
2921         </class>
2922         <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">
2923                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2924                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2925                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2926                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2927                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2928                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2929                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2930                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2931                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2932         </fields>
2933                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2934                         <actions>
2935                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2936                                 <retrieve/>
2937                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2938                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2939                         </actions>
2940                 </permacrud>
2941         </class>
2942         <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">
2943                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
2944                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2945                         <field name="usr" reporter:label="User" reporter:datatype="link" />
2946                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
2947                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
2948         </fields>
2949         <links>
2950                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2951                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
2952                 </links>
2953                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2954                         <actions>
2955                                 <retrieve permission="RUN_REPORTS">
2956                                         <context link="usr" field="home_ou" />
2957                                 </retrieve>
2958                         </actions>
2959                 </permacrud>
2960         </class>
2961         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
2962                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
2963                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2964                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
2965                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
2966                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
2967                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
2968                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
2969         </fields>
2970         <links>
2971                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
2972                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
2973                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
2974                 </links>
2975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2976                         <actions>
2977                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
2978                                         <context link="usr" field="home_ou" />
2979                                         <context link="ws" field="owning_lib" />
2980                                 </retrieve>
2981                                 <create permission="ADMIN_TOOLBAR" context_field="org">
2982                                         <context link="usr" field="home_ou" />
2983                                         <context link="ws" field="owning_lib" />
2984                                 </create>
2985                                 <update permission="ADMIN_TOOLBAR" context_field="org">
2986                                         <context link="usr" field="home_ou" />
2987                                         <context link="ws" field="owning_lib" />
2988                                 </update>
2989                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
2990                                         <context link="usr" field="home_ou" />
2991                                         <context link="ws" field="owning_lib" />
2992                                 </delete>
2993                         </actions>
2994                 </permacrud>
2995         </class>
2996         <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">
2997                 <fields oils_persist:primary="name">
2998                         <field name="name" reporter:datatype="text"/>
2999                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3000                 </fields>
3001                 <links/>
3002                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3003                         <actions>
3004                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3005                                 <retrieve/>
3006                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3007                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3008                         </actions>
3009                 </permacrud>
3010         </class>
3011         <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">
3012                 <fields oils_persist:primary="name">
3013                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3014                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3015                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
3016                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3017                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
3018                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3019                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3020                 </fields>
3021                 <links>
3022                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3023                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3024                 </links>
3025                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3026                         <actions>
3027                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3028                                 <retrieve/>
3029                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3030                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3031                         </actions>
3032                 </permacrud>
3033         </class>
3034         <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">
3035                 <fields oils_persist:primary="name">
3036                         <field name="name" reporter:datatype="text"/>
3037                         <field name="label" reporter:datatype="text"/>
3038                         <field name="description" reporter:datatype="text"/>
3039                         <field name="datatype" reporter:datatype="text"/>
3040                         <field name="view_perm" reporter:datatype="link"/>
3041                         <field name="update_perm" reporter:datatype="link"/>
3042                         <field name="fm_class" reporter:datatype="text"/>
3043                         <field name="grp" reporter:datatype="link"/>
3044                 </fields>
3045                 <links>
3046                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3047                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3048                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3049                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3050                 </links>
3051                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3052                         <actions>
3053                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3054                                 <retrieve/>
3055                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3056                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3057                         </actions>
3058                 </permacrud>
3059         </class>
3060         <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">
3061                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3062                         <field name="id" />
3063                         <field name="name"  reporter:datatype="text"/>
3064                         <field name="org_unit" reporter:datatype="org_unit"/>
3065                         <field name="value"  reporter:datatype="text"/>
3066                 </fields>
3067                 <links>
3068                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3069                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3070                 </links>
3071         </class>
3072         <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">
3073                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3074                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3075                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3076                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3077                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3078                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3079                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3080                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3081                 </fields>
3082                 <links>
3083                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3084                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3085                 </links>
3086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3087             <actions>
3088                 <create permission="CREATE_COPY_NOTE">
3089                     <context link="owning_copy" field="circ_lib"/>
3090                 </create>
3091                 <retrieve permission="VIEW_COPY_NOTES">
3092                     <context link="owning_copy" field="circ_lib"/>
3093                 </retrieve>
3094                 <update permission="UPDATE_COPY_NOTE">
3095                     <context link="owning_copy" field="circ_lib"/>
3096                 </update>
3097                 <delete permission="DELETE_COPY_NOTE">
3098                     <context link="owning_copy" field="circ_lib"/>
3099                 </delete>
3100             </actions>
3101         </permacrud>
3102         </class>
3103         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3104                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3105                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3106                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3107                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3108                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3109                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3110                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3111                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3112                 </fields>
3113                 <links>
3114                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3115                 </links>
3116         </class>
3117         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3118                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3119                         <field name="fingerprint"  reporter:datatype="text"/>
3120                         <field name="id" reporter:datatype="id" />
3121                         <field name="master_record" reporter:datatype="link"/>
3122                         <field name="mods"  reporter:datatype="text"/>
3123                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3124                 </fields>
3125                 <links>
3126                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3127                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3128                 </links>
3129         </class>
3130         <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">
3131                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3132                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3133                         <field name="name"  reporter:datatype="text"/>
3134                 </fields>
3135                 <links/>
3136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3137             <actions>
3138                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3139                 <retrieve/>
3140                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3141                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3142             </actions>
3143         </permacrud>
3144         </class>
3145         <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">
3146                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3147                         <field name="code"  reporter:datatype="text"/>
3148                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3149                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3150                 </fields>
3151                 <links/>
3152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3153             <actions>
3154                 <create permission="CREATE_PERM" global_required="true"/>
3155                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3156                 <update permission="UPDATE_PERM" global_required="true"/>
3157                 <delete permission="DELETE_PERM" global_required="true"/>
3158             </actions>
3159         </permacrud>
3160         </class>
3161         <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">
3162                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3163                         <field name="id" reporter:datatype="id" />
3164                         <field name="metarecord" reporter:datatype="link"/>
3165                         <field name="source" reporter:datatype="link"/>
3166                 </fields>
3167                 <links>
3168                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3169                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3170                 </links>
3171         </class>
3172         <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">
3173                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3174                         <field name="id" reporter:datatype="id" />
3175                         <field name="field" reporter:datatype="link"/>
3176                         <field name="source" reporter:datatype="link"/>
3177                         <field name="value"  reporter:datatype="text"/>
3178                 </fields>
3179                 <links>
3180                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3181                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3182                 </links>
3183         </class>
3184         <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">
3185                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3186                         <field name="id" reporter:datatype="id" />
3187                         <field name="value" reporter:datatype="text"/>
3188                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3189                 </fields>
3190                 <links>
3191                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3192                 </links>
3193         </class>
3194         <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">
3195                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3196                         <field name="id" reporter:datatype="id" />
3197                         <field name="entry" reporter:datatype="link"/>
3198                         <field name="def" reporter:datatype="link"/>
3199                         <field name="source" reporter:datatype="link"/>
3200                 </fields>
3201                 <links>
3202                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3203                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3204                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3205                 </links>
3206         </class>
3207         <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">
3208                 <oils_persist:source_definition>
3209                         SELECT * FROM metabib.author_field_entry
3210                                                 UNION ALL
3211                         SELECT * FROM metabib.keyword_field_entry
3212                                                 UNION ALL
3213                         SELECT * FROM metabib.identifier_field_entry
3214                                                 UNION ALL
3215                         SELECT * FROM metabib.title_field_entry
3216                                                 UNION ALL
3217                         SELECT * FROM metabib.subject_field_entry
3218                                                 UNION ALL
3219                         SELECT * FROM metabib.series_field_entry
3220                 </oils_persist:source_definition>
3221                 <fields>
3222                         <field name="field" reporter:datatype="link"/>
3223                         <field name="id" reporter:datatype="id" />
3224                         <field name="source" reporter:datatype="link"/>
3225                         <field name="value"  reporter:datatype="text"/>
3226                 </fields>
3227                 <links>
3228                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3229                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3230                 </links>
3231         </class>
3232         <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">
3233                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3234                         <field name="field" reporter:datatype="link"/>
3235                         <field name="id" reporter:datatype="id" />
3236                         <field name="source" reporter:datatype="link"/>
3237                         <field name="value"  reporter:datatype="text"/>
3238                 </fields>
3239                 <links>
3240                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3241                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3242                 </links>
3243         </class>
3244         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3245                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3246                         <field name="accepting_usr" reporter:datatype="link"/>
3247                         <field name="amount" reporter:datatype="money" />
3248                         <field name="amount_collected" reporter:datatype="money" />
3249                         <field name="cash_drawer" reporter:datatype="link"/>
3250                         <field name="id" reporter:datatype="id" />
3251                         <field name="note"  reporter:datatype="text"/>
3252                         <field name="payment_ts" reporter:datatype="timestamp"/>
3253                         <field name="xact" reporter:datatype="link"/>
3254                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3255                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3256                 </fields>
3257                 <links>
3258                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3259                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3260                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3261                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3262                 </links>
3263         </class>
3264         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3265                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3266                         <field name="accepting_usr" reporter:datatype="link"/>
3267                         <field name="amount" reporter:datatype="money" />
3268                         <field name="amount_collected" reporter:datatype="money" />
3269                         <field name="id" reporter:datatype="id" />
3270                         <field name="note"  reporter:datatype="text"/>
3271                         <field name="payment_ts" reporter:datatype="timestamp"/>
3272                         <field name="xact" reporter:datatype="link"/>
3273                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3274                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3275                 </fields>
3276                 <links>
3277                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3278                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3279                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3280                 </links>
3281         </class>
3282         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3283                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3284                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3285                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3286                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3287                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3288                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3289                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3290                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3291                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3292                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3293                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3294                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3295                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3296                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3297                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3298                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3299                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3300                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3301                 </fields>
3302                 <links>
3303                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3304                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3305                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3306                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3307                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3308                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3309                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3310                 </links>
3311         </class>
3312
3313         <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">
3314                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3315                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3316                         <field name="name"  reporter:datatype="text"/>
3317                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3318                         <field name="block_list" reporter:datatype="text"/>
3319                         <field name="staff_alert" reporter:datatype="bool"/>
3320                         <field name="org_depth" reporter:datatype="int"/>
3321                 </fields>
3322                 <links/>
3323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3324             <actions>
3325                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3326                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3327                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3328                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3329             </actions>
3330         </permacrud>
3331         </class>
3332         <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">
3333                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3334                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3335                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3336                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3337                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3338                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3339                 </fields>
3340                 <links>
3341                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3342                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3343                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3344         </links>
3345         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3346             <actions>
3347                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3348                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3349                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3350                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3351             </actions>
3352         </permacrud>
3353         </class>
3354         <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">
3355                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3356                         <field name="holdable" reporter:datatype="bool"/>
3357                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3358                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3359                         <field name="opac_visible" reporter:datatype="bool"/>
3360             <field name="copy_active" reporter:datatype="bool"/>
3361             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3362                 </fields>
3363                 <links/>
3364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3365             <actions>
3366                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3367                 <retrieve/>
3368                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3369                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3370             </actions>
3371         </permacrud>
3372         </class>
3373         <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">
3374                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3375                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3376                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3377                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3378                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3379                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3380                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3381                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3382                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3383                 </fields>
3384                 <links>
3385                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3386                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3387                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3388                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3389                 </links>
3390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3391                         <actions>
3392                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3393                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3394                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3395                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3396                         </actions>
3397                 </permacrud>
3398         </class>
3399         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3400                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3401                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3402                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3403                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3404                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3405                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3406                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3407                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3408                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3409                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3410                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3411                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3412                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3413                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3414                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3415                 </fields>
3416                 <links>
3417                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3418                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3419                 </links>
3420         </class>
3421         <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">
3422                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3423                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3424                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3425                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3426                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3427                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3428                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3429                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3430                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3431                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3432                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3433                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3434                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3435                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3436                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3437                 </fields>
3438                 <links>
3439                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3440                 </links>
3441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3442                         <actions>
3443                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3444                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3445                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3446                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3447                         </actions>
3448                 </permacrud>
3449         </class>
3450
3451
3452         <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">
3453                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3454                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3455                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3456                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3457                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3458                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3459                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3460                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3461                 </fields>
3462                 <links>
3463                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3464                 </links>
3465         </class>
3466
3467         <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">
3468                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3469                         <field name="call_number" />
3470                         <field name="create_date" reporter:datatype="timestamp"/>
3471                         <field name="creator" reporter:datatype="link"/>
3472                         <field name="id" reporter:datatype="id" />
3473                         <field name="pub" reporter:datatype="bool"/>
3474                         <field name="title"  reporter:datatype="text"/>
3475                         <field name="value"  reporter:datatype="text"/>
3476                 </fields>
3477                 <links>
3478                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3479                 </links>
3480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3481             <actions>
3482                 <create permission="CREATE_VOLUME_NOTE">
3483                     <context link="call_number" field="owning_lib"/>
3484                 </create>
3485                 <retrieve permission="VIEW_VOLUME_NOTES">
3486                     <context link="call_number" field="owning_lib"/>
3487                 </retrieve>
3488                 <update permission="UPDATE_VOLUME_NOTE">
3489                     <context link="call_number" field="owning_lib"/>
3490                 </update>
3491                 <delete permission="DELETE_VOLUME_NOTE">
3492                     <context link="call_number" field="owning_lib"/>
3493                 </delete>
3494             </actions>
3495         </permacrud>
3496         </class>
3497         <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">
3498                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3499                         <field name="create_date" reporter:datatype="timestamp"/>
3500                         <field name="creator" reporter:datatype="link"/>
3501                         <field name="edit_date" reporter:datatype="timestamp"/>
3502                         <field name="editor" reporter:datatype="link"/>
3503                         <field name="id" reporter:datatype="id" />
3504                         <field name="record" reporter:datatype="link"/>
3505                         <field name="value" reporter:datatype="text"/>
3506                 </fields>
3507                 <links>
3508                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3509                 </links>
3510         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3511             <actions>
3512                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3513                 <retrieve/>
3514                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3515                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3516             </actions>
3517         </permacrud>
3518         </class>
3519         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3520         <oils_persist:source_definition>
3521 SELECT  usr,
3522         SUM(
3523             CASE
3524                 WHEN (
3525                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3526                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3527                 ) THEN 1
3528                 ELSE 0
3529             END
3530         ) AS out,
3531
3532         SUM(
3533             CASE
3534                 WHEN (
3535                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3536                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3537                 ) THEN 1
3538                 ELSE 0
3539             END
3540         ) AS overdue,
3541
3542         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3543         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3544         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3545   FROM  action.circulation
3546   WHERE checkin_time IS NULL
3547   GROUP BY 1
3548         </oils_persist:source_definition>
3549         <fields oils_persist:primary="usr">
3550             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3551             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3552             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3553             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3554             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3555             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3556         </fields>
3557         <links>
3558             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3559         </links>
3560         </class>
3561         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3562         <oils_persist:source_definition>
3563 SELECT  usr,
3564         ARRAY_TO_STRING(ARRAY_ACCUM(
3565             CASE
3566                 WHEN (
3567                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3568                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3569                 ) THEN id
3570                 ELSE 0
3571             END
3572         ),',') AS out,
3573
3574         ARRAY_TO_STRING(ARRAY_ACCUM(
3575             CASE
3576                 WHEN (
3577                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3578                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3579                 ) THEN id
3580                 ELSE 0
3581             END
3582         ),',') AS overdue,
3583
3584         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3585         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3586         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3587   FROM  action.circulation
3588   WHERE checkin_time IS NULL
3589   GROUP BY 1
3590         </oils_persist:source_definition>
3591         <fields oils_persist:primary="usr">
3592             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3593             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3594             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3595             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3596             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3597             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3598         </fields>
3599         <links>
3600             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3601         </links>
3602         </class>
3603         <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">
3604                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3605                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3606                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3607                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3608                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3609                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3610                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3611                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3612                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3613                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3614                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3615                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3616                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3617                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3618                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3619                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3620                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3621                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3622                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3623                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3624                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3625                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3626                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3627                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3628                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3629                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3630                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3631                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3632                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3633                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3634                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3635                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3636                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3637                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3638                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3639                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3640                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3641                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3642                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3643                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3644                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3645                 </fields>
3646                 <links>
3647                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3648                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3649                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3650                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3651                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3652                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3653                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3654                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3655                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3656                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3657                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3658                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3659                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3660                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3661                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3662                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3663                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3664                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3665                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3666                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3667                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3668                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3669                 </links>
3670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3671                         <actions>
3672                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3673                         </actions>
3674                 </permacrud>
3675         </class>
3676         <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">
3677                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3678                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3679                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3680                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3681                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3682                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3683                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3684                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3685                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3686                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3687                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3688                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3689                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3690                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3691                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3692                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3693                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3694                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3695                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3696                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3697                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3698                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3699                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3700                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3701                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3702                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3703                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3704                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3705                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3706                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3707                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3708                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3709                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3710                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3711                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3712                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3713                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3714                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3715                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3716                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3717                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3718                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3719                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3720                 </fields>
3721                 <links>
3722                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3723                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3724                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3725                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3726                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3727                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3728                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3729                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3730                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3731                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3732                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3733                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3734                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3735                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3736                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3737                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3738                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3739                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3740                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3741                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3742                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3743                 </links>
3744         </class>
3745         <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">
3746                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3747                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3748                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3749                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3750                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3751                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3752                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3753                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3754                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3755                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3756                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3757                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3758                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3759                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3760                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3761                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3762                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3763                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3764                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3765                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3766                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3767                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3768                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3769                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3770                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3771                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3772                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3773                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3774                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3775                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3776                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3777                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3778                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3779                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3780                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3781                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3782                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3783                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3784                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3785                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3786                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3787                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3788                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3789                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3790                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3791                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3792                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3793                 </fields>
3794                 <links>
3795                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3796                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3797                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3798                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3799                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3800                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3801                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3802                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3803                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3804                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3805                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3806                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3807                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3808                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3809                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3810                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3811                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3812                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3813                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3814                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3815                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3816                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3817                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3818                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3819                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3820                 </links>
3821         </class>
3822
3823         <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">
3824                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3825                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3826                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3827                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3828                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3829                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3830                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3831                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3832                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3833                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3834                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3835                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3836                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3837                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3838                 </fields>
3839                 <links>
3840                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3841                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3842                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3843                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3844                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3845                 </links>
3846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3847                         <actions>
3848                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3849                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3850                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3851                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3852                         </actions>
3853                 </permacrud>
3854         </class>
3855
3856         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3857                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3858                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3859                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3860                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3861                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3862                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3863                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3864                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3865                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3866                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3867                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3868                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3869                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3870                 </fields>
3871                 <links>
3872                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3873                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3874                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3875                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3876                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3877                 </links>
3878                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3879                         <actions>
3880                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3881                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3882                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3883                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3884                         </actions>
3885                 </permacrud>
3886         </class>
3887         
3888         <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">
3889                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3890                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3891                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3892                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3893                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3894                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3895                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3896                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3897                 </fields>
3898                 <links>
3899                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3900                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3901                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3902                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3903                 </links>
3904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3905                         <actions>
3906                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3907                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3908                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3909                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3910                         </actions>
3911                 </permacrud>
3912         </class>
3913         
3914         <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">
3915                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3916                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3917                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3918                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3919                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3920                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3921                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3922                 </fields>
3923                 <links>
3924                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3925                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3926                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3927                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3928                 </links>
3929                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3930                         <actions>
3931                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3932                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3933                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3934                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3935                         </actions>
3936                 </permacrud>
3937         </class>
3938         
3939         <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">
3940                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3941                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3942                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3943                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3944                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3945                 </fields>
3946                 <links>
3947                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3948                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3949                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3950                 </links>
3951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3952                         <actions>
3953                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3954                     <context link="resource" field="owner" />
3955                 </create>
3956                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3957                     <context link="resource" field="owner" />
3958                 </retrieve>
3959                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3960                     <context link="resource" field="owner" />
3961                 </update>
3962                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3963                     <context link="resource" field="owner" />
3964                 </delete>
3965                         </actions>
3966                 </permacrud>
3967         </class>
3968         
3969         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3970                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3971                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3972                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3973                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3974                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3975                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3976                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3977                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3978                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3979                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3980                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3981                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3982                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3983                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3984                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3985                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3986                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3987                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3988                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3989                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3990                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3991                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3992                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3993                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3994                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3995                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3996                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3997                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3998                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3999                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4000                 </fields>
4001                 <links>
4002                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4003                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4004                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4005                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4006                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4007                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4008                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4009                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4010                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4011                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4012                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4013                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4014                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4015                 </links>
4016                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4017                         <actions>
4018                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4019                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4020                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4021                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4022                         </actions>
4023                 </permacrud>
4024         </class>
4025         
4026         <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">
4027                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4028                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4029                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4030                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4031                 </fields>
4032                 <links>
4033                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4034                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4035                 </links>
4036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4037                         <actions>
4038                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4039                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4040                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4041                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4042                         </actions>
4043                 </permacrud>
4044         </class>
4045
4046         <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">
4047                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4048                         <field name="bucket" reporter:datatype="link"/>
4049                         <field name="id" reporter:datatype="id" />
4050                         <field name="target_call_number" reporter:datatype="link" />
4051                         <field name="create_time" reporter:datatype="timestamp" />
4052                         <field name="pos" reporter:datatype="int" />
4053                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4054                 </fields>
4055                 <links>
4056                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4057                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4058             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4059                 </links>
4060         </class>
4061         <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">
4062                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4063                         <field name="id" reporter:datatype="id" />
4064                         <field name="item" reporter:datatype="link"/>
4065                         <field name="note" reporter:datatype="text" />
4066                 </fields>
4067                 <links>
4068                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4069                 </links>
4070         </class>
4071         <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">
4072                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4073                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4074                         <field name="btype" reporter:datatype="text"/>
4075                         <field name="id" reporter:datatype="id" />
4076                         <field name="name" reporter:datatype="text"/>
4077                         <field name="description" reporter:datatype="text"/>
4078                         <field name="owner" reporter:datatype="link"/>
4079                         <field name="pub" reporter:datatype="bool"/>
4080                         <field name="create_time" reporter:datatype="timestamp" />
4081                 </fields>
4082                 <links>
4083                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4084                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4085                 </links>
4086         </class>
4087         <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">
4088                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4089                         <field name="id" reporter:datatype="id" />
4090                         <field name="bucket" reporter:datatype="link"/>
4091                         <field name="note" reporter:datatype="text" />
4092                 </fields>
4093                 <links>
4094                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4095                 </links>
4096         </class>
4097         <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">
4098                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4099                         <field name="hold" reporter:datatype="link"/>
4100                         <field name="id" reporter:datatype="id" />
4101                         <field name="target_copy" reporter:datatype="link"/>
4102                 </fields>
4103                 <links>
4104                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4105                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4106                 </links>
4107         </class>
4108         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4109                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4110                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4111                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4112                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4113                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4114                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4115                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4116                 </fields>
4117                 <links>
4118                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4119                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4120                 </links>
4121         </class>
4122         <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">
4123                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4124                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4125                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4126                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4127                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4128                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4129                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4130                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4131                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4132                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4133                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4134                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4135                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4136                 </fields>
4137                 <links>
4138                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4139                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4140                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4141                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4142                 </links>
4143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4144             <actions>
4145                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4146                 <retrieve/>
4147                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4148                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4149             </actions>
4150         </permacrud>
4151         </class>
4152         <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">
4153                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4154                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4155                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4156                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4157                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4158             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4159             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4160             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4161                 </fields>
4162                 <links>
4163                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4164                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4165                 </links>
4166         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4167             <actions>
4168                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4169                 <retrieve/>
4170                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4171                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4172             </actions>
4173         </permacrud>
4174         </class>
4175         <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">
4176                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4177                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4178             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4179             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4180                 </fields>
4181                 <links>
4182                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4183                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4184                 </links>
4185         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4186             <actions>
4187                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4188                                         <context link="lgroup" field="owner" />
4189                 </create>
4190                 <retrieve/>
4191                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4192                                         <context link="lgroup" field="owner" />
4193                 </update>
4194                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4195                                         <context link="lgroup" field="owner" />
4196                 </delete>
4197             </actions>
4198         </permacrud>
4199         </class>
4200
4201     <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">
4202         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4203             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4204             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4205             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4206             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4207         </fields>
4208         <links>
4209             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4210             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4211         </links>
4212         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4213             <actions>
4214                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4215                 <retrieve/>
4216                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4217                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4218             </actions>
4219         </permacrud>
4220     </class>
4221
4222         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4223                 <fields>
4224                         <field name="sre_id" oils_persist:virtual="true" />
4225                         <field name="location" oils_persist:virtual="true" />
4226                         <field name="owning_lib" oils_persist:virtual="true" />
4227                         <field name="basic_holdings" oils_persist:virtual="true" />
4228                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4229                         <field name="supplement_holdings" oils_persist:virtual="true" />
4230                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4231                         <field name="index_holdings" oils_persist:virtual="true" />
4232                         <field name="index_holdings_add" oils_persist:virtual="true" />
4233                         <field name="online" oils_persist:virtual="true" />
4234                         <field name="missing" oils_persist:virtual="true" />
4235                         <field name="incomplete" oils_persist:virtual="true" />
4236                 </fields>
4237         </class>
4238
4239         <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">
4240                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4241                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4242                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4243                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4244                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4245                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4246                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4247                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4248                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4249                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4250                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4251                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4252                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4253                 </fields>
4254                 <links>
4255                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4256                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4257                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4258                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4259                 </links>
4260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4261                         <actions>
4262                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4263                                 <retrieve/>
4264                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4265                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4266                         </actions>
4267                 </permacrud>
4268         </class>
4269
4270         <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">
4271                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4272                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4273                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4274                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4275                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4276                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4277                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4278                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4279                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4280                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4281                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4282                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4283                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4284                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4285                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4286                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4287                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4288                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4289                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4290                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4291                 </fields>
4292                 <links>
4293                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4294                 </links>
4295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4296                         <actions>
4297                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4298                                         <context link="subscription" field="owning_lib" />
4299                                 </create>
4300                                 <retrieve />
4301                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4302                                         <context link="subscription" field="owning_lib" />
4303                                 </update>
4304                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4305                                         <context link="subscription" field="owning_lib" />
4306                                 </delete>
4307                         </actions>
4308                 </permacrud>
4309         </class>
4310
4311         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4312                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4313                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4314                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4315                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4316                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4317                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4318                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4319                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4320                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4321                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4322                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4323                 </fields>
4324                 <links>
4325                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4326                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4327                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4328                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4329                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4330                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4331                 </links>
4332                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4333                         <actions>
4334                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4335                                 <retrieve />
4336                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4337                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4338                         </actions>
4339                 </permacrud>
4340         </class>
4341
4342         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4343                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4344                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4345                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4346                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4347                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4348                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4349                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4350                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4351                 </fields>
4352                 <links>
4353                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4354                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4355                 </links>
4356         </class>
4357
4358         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4359                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4360                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4361                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4362                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4363                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4364                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4365                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4366                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4367                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4368                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4369                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4370                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4371                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4372                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4373                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4374                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4375                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4376                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4377                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4378                 </fields>
4379                 <links>
4380                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4381                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4382                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4383                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4384                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4385                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4386                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4387                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4388                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4389                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4390                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4391                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4392                 </links>
4393                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4394                         <actions>
4395                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4396                                 <retrieve />
4397                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4398                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4399                         </actions>
4400                 </permacrud>
4401         </class>
4402
4403         <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">
4404                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4405                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4406                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4407                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4408                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4409                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4410                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4411                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4412                 </fields>
4413                 <links>
4414                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4415                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4416                 </links>
4417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4418                         <actions>
4419                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4420                                         <context link="distribution" field="holding_lib" />
4421                                 </create>
4422                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4423                                         <context link="distribution" field="holding_lib" />
4424                                 </retrieve>
4425                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4426                                         <context link="distribution" field="holding_lib" />
4427                                 </update>
4428                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4429                                         <context link="distribution" field="holding_lib" />
4430                                 </delete>
4431                         </actions>
4432                 </permacrud>
4433         </class>
4434
4435         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4436                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4437                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4438                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4439                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4440                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4441                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4442                 </fields>
4443                 <links>
4444                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4445                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4446                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4447                 </links>
4448                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4449                         <actions>
4450                                 <create permission="ADMIN_SERIAL_STREAM">
4451                                         <context link="distribution" field="holding_lib" />
4452                                 </create>
4453                                 <retrieve />
4454                                 <update permission="ADMIN_SERIAL_STREAM">
4455                                         <context link="distribution" field="holding_lib" />
4456                                 </update>
4457                                 <delete permission="ADMIN_SERIAL_STREAM">
4458                                         <context link="distribution" field="holding_lib" />
4459                                 </delete>
4460                         </actions>
4461                 </permacrud>
4462         </class>
4463
4464         <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">
4465                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4466                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4467                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4468                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4469                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4470                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4471                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4472                 </fields>
4473                 <links>
4474                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4475                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4476                 </links>
4477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4478                         <actions>
4479                                 <create permission="ADMIN_SERIAL_STREAM">
4480                                         <context link="stream" jump="distribution" field="holding_lib" />
4481                                 </create>
4482                                 <retrieve permission="RECEIVE_SERIAL">
4483                                         <context link="stream" jump="distribution" field="holding_lib" />
4484                                 </retrieve>
4485                                 <update permission="ADMIN_SERIAL_STREAM">
4486                                         <context link="stream" jump="distribution" field="holding_lib" />
4487                                 </update>
4488                                 <delete permission="ADMIN_SERIAL_STREAM">
4489                                         <context link="stream" jump="distribution" field="holding_lib" />
4490                                 </delete>
4491                         </actions>
4492                 </permacrud>
4493         </class>
4494
4495         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4496                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4497                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4498                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4499                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4500                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4501                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4502                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4503                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4504                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4505                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4506                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4507                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4508                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4509                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4510                 </fields>
4511                 <links>
4512                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4513                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4514                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4515                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4516                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4517                 </links>
4518                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4519                         <actions>
4520                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4521                                         <context link="subscription" field="owning_lib" />
4522                                 </create>
4523                                 <retrieve/>
4524                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4525                                         <context link="subscription" field="owning_lib" />
4526                                 </update>
4527                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4528                                         <context link="subscription" field="owning_lib" />
4529                                 </delete>
4530                         </actions>
4531                 </permacrud>
4532         </class>
4533
4534         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4535                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4536                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4537                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4538                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4539                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4540                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4541                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4542                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4543                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4544                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4545                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4546                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4547                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4548                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4549                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4550                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4551                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4552                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4553                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4554                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4555                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4556                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4557                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4558                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4559                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4560                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4561                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4562                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4563                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4564                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4565                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4566                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4567                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4568                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4569                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4570                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4571                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4572                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4573                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4574                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4575                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4576                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4577                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4578                 </fields>
4579                 <links>
4580                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4581                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4582                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4583                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4584                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4585                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4586                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4587                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4588                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4589                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4590                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4591                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4592                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4593                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4594                 </links>
4595                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4596                         <actions>
4597                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4598                                 <retrieve/>
4599                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4600                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4601                         </actions>
4602                 </permacrud>
4603         </class>
4604
4605         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4606                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4607                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4608                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4609                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4610                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4611                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4612                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4613                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4614                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4615                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4616                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4617                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4618                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4619                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4620                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4621                 </fields>
4622                 <links>
4623                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4624                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4625                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4626                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4627                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4628                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4629                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4630                 </links>
4631                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4632                         <actions>
4633                                 <create permission="ADMIN_SERIAL_ITEM">
4634                                         <context link="stream" jump="distribution" field="holding_lib" />
4635                                 </create>
4636                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4637                                         <context link="stream" jump="distribution" field="holding_lib" />
4638                                 </retrieve>
4639                                 <update permission="ADMIN_SERIAL_ITEM">
4640                                         <context link="stream" jump="distribution" field="holding_lib" />
4641                                 </update>
4642                                 <delete permission="ADMIN_SERIAL_ITEM">
4643                                         <context link="stream" jump="distribution" field="holding_lib" />
4644                                 </delete>
4645                         </actions>
4646                 </permacrud>
4647         </class>
4648
4649         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4650                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4651                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4652                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4653                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4654                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4655                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4656                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4657                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4658                 </fields>
4659                 <links>
4660                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4661                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4662                 </links>
4663                 <!-- Not available via PCRUD at this time -->
4664         </class>
4665         <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">
4666                 <fields>
4667                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4668                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4669                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4670                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4671                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4672                 </fields>
4673                 <links>
4674                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4675                 </links>
4676         </class>
4677         <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">
4678                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4679                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4680                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4681                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4682                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4683                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4684                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4685                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4686                 </fields>
4687                 <links>
4688                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4689                 </links>
4690         </class>
4691         <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">
4692                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4693                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4694                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4695                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4696                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4697                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4698                 </fields>
4699                 <links>
4700                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4701                 </links>
4702                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4703                         <actions>
4704                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4705                                         <context link="distribution" field="holding_lib" />
4706                                 </create>
4707                                 <retrieve/>
4708                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4709                                         <context link="distribution" field="holding_lib" />
4710                                 </update>
4711                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4712                                         <context link="distribution" field="holding_lib" />
4713                                 </delete>
4714                         </actions>
4715                 </permacrud>
4716         </class>
4717
4718         <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">
4719                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4720                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4721                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4722                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4723                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4724                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4725                 </fields>
4726                 <links>
4727                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4728                 </links>
4729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4730                         <actions>
4731                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4732                                         <context link="distribution" field="holding_lib" />
4733                                 </create>
4734                                 <retrieve/>
4735                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4736                                         <context link="distribution" field="holding_lib" />
4737                                 </update>
4738                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4739                                         <context link="distribution" field="holding_lib" />
4740                                 </delete>
4741                         </actions>
4742                 </permacrud>
4743         </class>
4744
4745         <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">
4746                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4747                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4748                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4749                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4750                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4751                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4752                 </fields>
4753                 <links>
4754                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4755                 </links>
4756                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4757                         <actions>
4758                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4759                                         <context link="distribution" field="holding_lib" />
4760                                 </create>
4761                                 <retrieve/>
4762                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4763                                         <context link="distribution" field="holding_lib" />
4764                                 </update>
4765                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4766                                         <context link="distribution" field="holding_lib" />
4767                                 </delete>
4768                         </actions>
4769                 </permacrud>
4770         </class>
4771
4772         <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">
4773                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4774                         <field name="id" reporter:datatype="id" />
4775                         <field name="owning_copy" reporter:datatype="link"/>
4776                         <field name="stat_cat" reporter:datatype="link"/>
4777                         <field name="stat_cat_entry" reporter:datatype="link"/>
4778                 </fields>
4779                 <links>
4780                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4781                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4782                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4783                 </links>
4784         </class>
4785         <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">
4786                 <fields oils_persist:primary="code">
4787                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4788                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4789                 </fields>
4790                 <links/>
4791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4792             <actions>
4793                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4794                 <retrieve/>
4795                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4796                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4797             </actions>
4798         </permacrud>
4799         </class>
4800         <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">
4801                 <fields oils_persist:primary="code">
4802                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4803                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4804                 </fields>
4805                 <links/>
4806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4807             <actions>
4808                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4809                 <retrieve/>
4810                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4811                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4812             </actions>
4813         </permacrud>
4814         </class>
4815         <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">
4816                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4817                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4818                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4819                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4820                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4821                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4822                 </fields>
4823                 <links>
4824             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4825         </links>
4826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4827             <actions>
4828                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4829                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4830                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4831                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4832             </actions>
4833         </permacrud>
4834         </class>
4835         <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">
4836                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4837                         <field name="id" reporter:datatype="id" />
4838                         <field name="name" reporter:datatype="text"/>
4839                 </fields>
4840                 <links/>
4841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4842             <actions>
4843                 <create permission="CREATE_LASSO" global_required="true"/>
4844                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4845                 <update permission="UPDATE_LASSO" global_required="true"/>
4846                 <delete permission="DELETE_LASSO" global_required="true"/>
4847             </actions>
4848         </permacrud>
4849         </class>
4850         <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">
4851                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4852                         <field name="id" reporter:datatype="id" />
4853                         <field name="lasso" reporter:datatype="link"/>
4854                         <field name="org_unit" reporter:datatype="org_unit"/>
4855                 </fields>
4856                 <links>
4857                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4858                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4859                 </links>
4860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4861             <actions>
4862                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4863                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4864                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4865                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4866             </actions>
4867         </permacrud>
4868         </class>
4869         <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">
4870                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4871                         <field name="id" reporter:datatype="id" />
4872                         <field name="from_org" reporter:datatype="org_unit"/>
4873                         <field name="to_org" reporter:datatype="org_unit"/>
4874                         <field name="prox" reporter:datatype="int" />
4875                 </fields>
4876                 <links>
4877                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4878                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4879                 </links>
4880         </class>
4881         <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">
4882                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4883                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4884                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4885                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4886                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4887                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4888                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4889                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4890                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4891                 </fields>
4892                 <links/>
4893         </class>
4894         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4895                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4896                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4897                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4898                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4899                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4900                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4901                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4902                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4903                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4904                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4905                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4906                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4907                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4908                 </fields>
4909                 <links>
4910                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4911                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4912                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4913                 </links>
4914         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4915             <actions>
4916                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4917                 <retrieve/>
4918                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4919                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4920             </actions>
4921         </permacrud>
4922         </class>
4923         <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">
4924                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4925                         <field name="address_type"  reporter:datatype="text"/>
4926                         <field name="city"  reporter:datatype="text"/>
4927                         <field name="country"  reporter:datatype="text"/>
4928                         <field name="county"  reporter:datatype="text"/>
4929                         <field name="id" reporter:datatype="id" />
4930                         <field name="org_unit" reporter:datatype="org_unit"/>
4931                         <field name="post_code"  reporter:datatype="text"/>
4932                         <field name="state"  reporter:datatype="text"/>
4933                         <field name="street1"  reporter:datatype="text"/>
4934                         <field name="street2"  reporter:datatype="text"/>
4935                         <field name="valid" reporter:datatype="bool"/>
4936                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4937                 </fields>
4938                 <links>
4939                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4940                 </links>
4941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4942             <actions>
4943                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4944                 <retrieve/>
4945                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4946                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4947             </actions>
4948         </permacrud>
4949         </class>
4950         <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">
4951                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
4952                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4953                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4954                         <field name="query_text" reporter:datatype="text"/>
4955                 </fields>
4956         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4957             <actions>
4958                 <retrieve/>
4959             </actions>
4960         </permacrud>
4961         </class>
4962
4963         <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">
4964                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
4965                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4966                         <field name="owner" reporter:datatype="org_unit"/>
4967                         <field name="code" reporter:datatype="text"/>
4968                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4969                         <field name="create_date" reporter:datatype="timestamp"/>
4970                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4971                 </fields>
4972                 <links>
4973                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4974                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
4975                 </links>
4976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4977             <actions>
4978                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4979                 <retrieve/>
4980                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4981                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4982             </actions>
4983         </permacrud>
4984         </class>
4985         <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">
4986                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
4987                         <field name="id" reporter:datatype="id"/>
4988                         <field name="grp" reporter:datatype="link"/>
4989                         <field name="pos" reporter:datatype="int"/>
4990                         <field name="query" reporter:datatype="link"/>
4991                 </fields>
4992                 <links>
4993                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
4994                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
4995                 </links>
4996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4997             <actions>
4998                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
4999                     <context link="grp" field="owner"/>
5000                 </create>
5001                 <retrieve/>
5002                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5003                     <context link="grp" field="owner"/>
5004                 </update>
5005                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5006                     <context link="grp" field="owner"/>
5007                 </delete>
5008             </actions>
5009         </permacrud>
5010         </class>
5011
5012         <!-- A note: Please update alhr and ahopl when updating ahr -->
5013         <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">
5014                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5015                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5016                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5017                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5018                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5019                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5020                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5021                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5022                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5023                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5024                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5025                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5026                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5027                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5028                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5029                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5030                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5031                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5032                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5033                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5034                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5035                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5036                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5037                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5038                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5039                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5040                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5041                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5042                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5043                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5044                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5045                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5046                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5047                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5048                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5049                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5050                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5051                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5052                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5053                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5054                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5055                 </fields>
5056                 <links>
5057                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5058                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5059                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5060                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5061                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5062                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5063                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5064                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5065                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5066                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5067                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5068                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5069                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5070                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5071                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5072                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5073                 </links>
5074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5075                         <actions>
5076                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5077                         </actions>
5078                 </permacrud>
5079         </class>
5080         <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">
5081                 <oils_persist:source_definition><![CDATA[
5082                 SELECT
5083                         ahr.*,
5084                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5085                                 copy_location_order_position,
5086                         CASE WHEN au.alias IS NOT NULL THEN
5087                                 au.alias
5088                         ELSE
5089                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5090                                         COALESCE(au.family_name, ''),
5091                                         COALESCE(au.suffix, ''),
5092                                         ', ',
5093                                         COALESCE(au.prefix, ''),
5094                                         COALESCE(au.first_given_name, ''),
5095                                         COALESCE(au.second_given_name, '')
5096                                 ], ' '), E'\\s+,', ',')
5097                         END AS usr_display_name,
5098                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5099                                 AS call_number_label,
5100                         siss.label AS issuance_label,
5101                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5102                         ahcm_1.copy_count AS potential_copies
5103                 FROM action.hold_request ahr
5104                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5105                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5106                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5107                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5108                 JOIN actor.usr au ON (au.id = ahr.usr)
5109                 JOIN (
5110                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5111                         FROM asset.copy_location
5112                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5113                 LEFT JOIN actor.usr_standing_penalty ausp 
5114                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5115                 LEFT JOIN config.standing_penalty csp
5116                         ON (
5117                                 csp.id = ausp.standing_penalty AND 
5118                                 csp.block_list LIKE '%CAPTURE%' AND (
5119                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5120                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5121                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5122                                         )
5123                                 )
5124                         )
5125                 JOIN (
5126                         SELECT COUNT(target_copy) AS copy_count, hold
5127                         FROM action.hold_copy_map
5128                         GROUP BY 2
5129                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5130                 LEFT JOIN serial.issuance siss
5131                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5132                 LEFT JOIN asset.copy_location_order acplo
5133                         ON (acp.location = acplo.location AND
5134                                 acp.circ_lib = acplo.org)
5135                 WHERE
5136                         ahr.capture_time IS NULL AND
5137                         ahr.cancel_time IS NULL AND
5138                         csp.id IS NULL AND
5139                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5140                 ]]></oils_persist:source_definition>
5141                 <fields oils_persist:primary="id">
5142                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5143                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5144                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5145                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5146                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5147                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5148                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5149                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5150                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5151                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5152                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5153                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5154                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5155                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5156                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5157                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5158                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5159                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5160                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5161                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5162                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5163                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5164                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5165                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5166                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5167                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5168                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5169                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5170                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5171                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5172                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5173                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5174                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5175                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5176                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5177                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5178                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5179                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5180                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5181                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5182                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5183                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5184                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5185                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5186                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5187                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5188                 </fields>
5189                 <links>
5190                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5191                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5192                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5193                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5194                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5195                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5196                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5197                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5198                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5199                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5200                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5201                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5202                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5203                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5204                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5205                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5206                 </links>
5207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5208                         <actions>
5209                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5210                         </actions>
5211                 </permacrud>
5212         </class>
5213         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5214                 <oils_persist:source_definition>
5215                         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)
5216                 </oils_persist:source_definition>
5217                 <fields oils_persist:primary="id">
5218                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5219                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5220                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5221                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5222                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5223                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5224                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5225                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5226                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5227                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5228                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5229                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5230                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5231                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5232                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5233                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5234                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5235                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5236                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5237                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5238                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5239                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5240                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5241                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5242                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5243                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5244                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5245                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5246                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5247                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5248                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5249                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5250                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5251                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5252                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5253                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5254                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5255                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5256                 </fields>
5257                 <links>
5258                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5259                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5260                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5261                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5262                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5263                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5264                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5265                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5266                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5267                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5268                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5269                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5270                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5271                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5272                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5273                 </links>
5274         </class>
5275
5276         <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">
5277                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5278                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5279                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5280                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5281                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5282                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5283                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5284                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5285                 </fields>
5286                 <links>
5287                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5288                 </links>
5289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5290                         <actions>
5291                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5292                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5293                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5294                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5295                         </actions>
5296                 </permacrud>
5297         </class>
5298         <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">
5299                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5300                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5301                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5302                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5303                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5304                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5305                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5306                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5307                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5308                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5309                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5310                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5311                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5312                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5313                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5314                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5315                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5316                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5317                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5318                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5319                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5320                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5321                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5322                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5323                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5324                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5325                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5326                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5327                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5328                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5329                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5330                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5331                 </fields>
5332                 <links>
5333                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5334                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5335                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5336                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5337                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5338                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5339                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5340                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5341                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5342                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5343                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5344                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5345                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5346                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5347                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5348                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5349                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5350                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5351                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5352                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5353                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5354                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5355                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5356                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5357                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5358                 </links>
5359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5360             <actions>
5361                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5362                 <retrieve />
5363                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5364                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5365             </actions>
5366         </permacrud>
5367         </class>
5368         <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">
5369                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5370                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5371                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5372                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5373                 </fields>
5374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5375                         <actions>
5376                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5377                                 <retrieve/>
5378                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5379                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5380                         </actions>
5381                 </permacrud>
5382         </class>
5383         <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">
5384                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5385                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5386                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5387                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5388                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5389                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5390                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5391                 </fields>
5392                 <links>
5393                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5394                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5395                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5396                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5397                 </links>
5398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5399                         <actions>
5400                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5401                                 <retrieve/>
5402                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5403                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5404                         </actions>
5405                 </permacrud>
5406         </class>
5407         <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">
5408                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5409                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5410                         <field name="btype" reporter:datatype="text"/>
5411                         <field name="id" reporter:datatype="id" />
5412                         <field name="name"  reporter:datatype="text"/>
5413                         <field name="description" reporter:datatype="text"/>
5414                         <field name="owner" reporter:datatype="link"/>
5415                         <field name="pub" reporter:datatype="bool"/>
5416                         <field name="create_time" reporter:datatype="timestamp" />
5417                 </fields>
5418                 <links>
5419                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5420                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5421                 </links>
5422         </class>
5423         <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">
5424                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5425                         <field name="id" reporter:datatype="id" />
5426                         <field name="bucket" reporter:datatype="link"/>
5427                         <field name="note" reporter:datatype="text" />
5428                 </fields>
5429                 <links>
5430                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5431                 </links>
5432         </class>
5433         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5434                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5435                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5436                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5437                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5438                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5439                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5440                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5441                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5442                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5443                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5444                 </fields>
5445                 <links>
5446                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5447                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5448                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5449                 </links>
5450         </class>
5451         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5452                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5453                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5454                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5455                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5456                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5457                 </fields>
5458                 <links>
5459                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5460                 </links>
5461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5462                         <actions>
5463                                 <retrieve permission="VIEW_USER">
5464                                         <context link="usr" field="home_ou" />
5465                                 </retrieve>
5466                         </actions>
5467                 </permacrud>
5468         </class>
5469     <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">
5470         <fields oils_persist:primary="field">
5471             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5472             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5473             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5474         </fields>
5475         <links/>
5476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5477             <actions>
5478                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5479                 <retrieve />
5480                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5481                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5482             </actions>
5483         </permacrud>
5484     </class>
5485         <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">
5486                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5487                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5488                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5489                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5490                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5491                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5492                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5493                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5494                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5495                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5496                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5497                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5498                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5499                 </fields>
5500                 <links>
5501                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5502                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5503                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5504                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5505                 </links>
5506         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5507             <actions>
5508                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5509                 <retrieve />
5510                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5511                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5512             </actions>
5513         </permacrud>
5514         </class>
5515         <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">
5516                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5517                         <field name="field" reporter:datatype="link"/>
5518                         <field name="id" reporter:datatype="id" />
5519                         <field name="source" reporter:datatype="link"/>
5520                         <field name="value"  reporter:datatype="text"/>
5521                 </fields>
5522                 <links>
5523                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5524                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5525                 </links>
5526         </class>
5527         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5528                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5529                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5530                         <field name="btype" reporter:datatype="text"/>
5531                         <field name="id" reporter:datatype="id" />
5532                         <field name="name"  reporter:datatype="text"/>
5533                         <field name="description" reporter:datatype="text"/>
5534                         <field name="owner" reporter:datatype="link"/>
5535                         <field name="pub" reporter:datatype="bool"/>
5536                         <field name="create_time" reporter:datatype="timestamp" />
5537                 </fields>
5538                 <links>
5539                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5540                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5541                 </links>
5542         </class>
5543         <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">
5544                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5545                         <field name="id" reporter:datatype="id" />
5546                         <field name="bucket" reporter:datatype="link"/>
5547                         <field name="note" reporter:datatype="text" />
5548                 </fields>
5549                 <links>
5550                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5551                 </links>
5552         </class>
5553         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5554                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5555                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5556                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5557                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5558                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5559                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5560                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5561                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5562                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5563                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5564                 </fields>
5565                 <links>
5566                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5567                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5568                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5569                 </links>
5570         </class>
5571         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5572                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5573                         <field name="id" reporter:datatype="id" />
5574                         <field name="ind1" />
5575                         <field name="ind2" />
5576                         <field name="record" />
5577                         <field name="subfield" />
5578                         <field name="tag" />
5579                         <field name="value" />
5580                 </fields>
5581                 <links>
5582                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5583                 </links>
5584         </class>
5585         <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">
5586                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5587                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5588                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5589                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5590                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5591                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5592                 </fields>
5593                 <links>
5594                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5595                 </links>
5596         </class>
5597         <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">
5598                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5599                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5600                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5601                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5602                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5603                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5604                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5605                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5606                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5607                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5608                 </fields>
5609                 <links>
5610                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5611                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5612                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5613                 </links>
5614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5615             <actions>
5616                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5617                 <retrieve/>
5618                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5619                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5620             </actions>
5621         </permacrud>
5622         </class>
5623         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5624                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5625                         <field name="create_date" reporter:datatype="timestamp"/>
5626                         <field name="creator" reporter:datatype="link"/>
5627                         <field name="edit_date" reporter:datatype="timestamp"/>
5628                         <field name="editor" reporter:datatype="link"/>
5629                         <field name="id" reporter:datatype="id" />
5630                         <field name="pub" reporter:datatype="bool"/>
5631                         <field name="record" reporter:datatype="link"/>
5632                         <field name="value"  reporter:datatype="text"/>
5633                 </fields>
5634                 <links>
5635                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5636                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5637                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5638                 </links>
5639         </class>
5640         <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">
5641                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5642                         <field name="balance_owed" reporter:datatype="money" />
5643                         <field name="total_owed" reporter:datatype="money" />
5644                         <field name="total_paid" reporter:datatype="money" />
5645                         <field name="usr" reporter:datatype="link"/>
5646                 </fields>
5647                 <links>
5648                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5649                 </links>
5650         </class>
5651         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5652                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5653                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5654                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5655                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5656                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5657                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5658                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5659                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5660                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5661                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5662                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5663                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5664                 </fields>
5665                 <links>
5666                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5667                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5668                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5669                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5670                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5671                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5672                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5673                 </links>
5674         </class>
5675         <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">
5676                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5677                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5678                         <field name="quality" reporter:datatype="int" />
5679                         <field name="source" reporter:datatype="text"/>
5680                         <field name="transcendant" reporter:datatype="bool"/>
5681                         <field name="can_have_copies" reporter:datatype="bool"/>
5682                 </fields>
5683                 <links/>
5684         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5685             <actions>
5686                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5687                 <retrieve/>
5688                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5689                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5690             </actions>
5691         </permacrud>
5692         </class>
5693         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5694                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5695                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5696                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5697                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5698                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5699                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5700                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5701                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5702                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5703                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5704                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5705                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5706                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5707                 </fields>
5708                 <links>
5709                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5710                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5711                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5712                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5713                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5714                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5715                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5716                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5717                 </links>
5718         </class>
5719         <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">
5720                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5721                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5722                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5723                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5724                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5725                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5726                 </fields>
5727                 <links>
5728                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5729                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5730                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5731                 </links>
5732         </class>
5733         <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">
5734                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5735                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5736                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5737                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5738                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5739                 </fields>
5740                 <links>
5741                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5742                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5743                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5744                 </links>
5745         </class>
5746         <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">
5747                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5748                         <field name="bucket" reporter:datatype="link"/>
5749                         <field name="id" reporter:datatype="id" />
5750                         <field name="target_user" reporter:datatype="link"/>
5751                         <field name="create_time" reporter:datatype="timestamp" />
5752                         <field name="pos" reporter:datatype="int" />
5753                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5754                 </fields>
5755                 <links>
5756                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5757                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5758             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5759                 </links>
5760         </class>
5761         <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">
5762                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5763                         <field name="id" reporter:datatype="id" />
5764                         <field name="item" reporter:datatype="link"/>
5765                         <field name="note" reporter:datatype="text" />
5766                 </fields>
5767                 <links>
5768                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5769                 </links>
5770         </class>
5771         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5772                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5773                         <field name="balance_owed" reporter:datatype="money" />
5774                         <field name="total_owed" reporter:datatype="money" />
5775                         <field name="total_paid" reporter:datatype="money" />
5776                         <field name="usr" reporter:datatype="link"/>
5777                 </fields>
5778                 <links>
5779                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5780                 </links>
5781         </class>
5782         <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">
5783                 <fields oils_persist:primary="code" oils_persist:sequence="">
5784                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5785                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5786                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5787                 </fields>
5788                 <links/>
5789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5790             <actions>
5791                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5792                 <retrieve/>
5793                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5794                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5795             </actions>
5796         </permacrud>
5797         </class>
5798         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5799                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5800                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5801                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5802                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5803                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5804                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5805                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5806                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5807                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5808                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5809                 </fields>
5810                 <links>
5811                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5812                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5813                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5814                 </links>
5815         </class>
5816         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5817                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5818                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5819                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5820                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5821                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5822                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5823                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5824                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5825                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5826                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5827                 </fields>
5828                 <links>
5829                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5830                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5831                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5832                 </links>
5833         </class>
5834         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5835                 <fields oils_persist:primary="id" oils_persist:sequence="">
5836                         <field name="checkin_lib" reporter:datatype="link"/>
5837                         <field name="checkin_staff" reporter:datatype="link"/>
5838                         <field name="checkin_time" reporter:datatype="timestamp"/>
5839                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5840                         <field name="circ_staff" reporter:datatype="link"/>
5841                         <field name="desk_renewal" reporter:datatype="bool"/>
5842                         <field name="due_date" reporter:datatype="timestamp"/>
5843                         <field name="duration" reporter:datatype="interval"/>
5844                         <field name="duration_rule" reporter:datatype="link"/>
5845                         <field name="fine_interval" reporter:datatype="interval"/>
5846                         <field name="id" reporter:datatype="id" />
5847                         <field name="max_fine" reporter:datatype="money" />
5848                         <field name="max_fine_rule" reporter:datatype="link"/>
5849                         <field name="opac_renewal" reporter:datatype="bool"/>
5850                         <field name="phone_renewal" reporter:datatype="bool"/>
5851                         <field name="recurring_fine" reporter:datatype="money" />
5852                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5853                         <field name="renewal_remaining" reporter:datatype="int" />
5854             <field name="grace_period" reporter:datatype="interval" />
5855                         <field name="stop_fines" reporter:datatype="text"/>
5856                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5857                         <field name="target_copy" reporter:datatype="link"/>
5858                         <field name="usr" reporter:datatype="link"/>
5859                         <field name="xact_finish" reporter:datatype="timestamp" />
5860                         <field name="xact_start" reporter:datatype="timestamp" />
5861                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5862                 </fields>
5863                 <links>
5864                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5865                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5866                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5867                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5868                 </links>
5869         </class>
5870         <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">
5871                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5872                         <field name="field" reporter:datatype="link"/>
5873                         <field name="id" reporter:datatype="id" />
5874                         <field name="source" reporter:datatype="link"/>
5875                         <field name="value" reporter:datatype="text"/>
5876                 </fields>
5877                 <links>
5878                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5879                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5880                 </links>
5881         </class>
5882         <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">
5883                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5884                         <field name="high" reporter:datatype="money" />
5885                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5886                         <field name="low" reporter:datatype="money" />
5887                         <field name="name" reporter:datatype="text"/>
5888                         <field name="normal" reporter:datatype="money" />
5889                         <field name="recurrence_interval" reporter:datatype="interval"/>
5890             <field name="grace_period" reporter:datatype="interval" />
5891                 </fields>
5892                 <links/>
5893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5894             <actions>
5895                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5896                 <retrieve/>
5897                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5898                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5899             </actions>
5900         </permacrud>
5901         </class>
5902         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5903                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5904                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5905                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5906                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5907                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5908                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5909                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5910                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5911                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5912                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5913                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5914                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5915                 </fields>
5916                 <links>
5917                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5918                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5919                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5920                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5921                 </links>
5922         </class>
5923         <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">
5924                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5925                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5926                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5927                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5928                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5929                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5930                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5931                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5932                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5933                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5934                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5935                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5936                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5937                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5938                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5939                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5940                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5941                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5942                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5943                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5944                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5945                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5946                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5947                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5948                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5949                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5950                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5951                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5952                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5953                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5954                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5955                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5956                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5957                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5958                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5959                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5960                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5961                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5962                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5963                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5964                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5965                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5966                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5967                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5968                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5969                 </fields>
5970                 <links>
5971                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5972                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5973                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5974                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5975                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5976                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5977                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5978                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5979                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5980                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5981                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5982                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5983                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5984                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5985                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5986                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5987                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5988                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5989                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5990                 </links>
5991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5992             <actions>
5993                 <create permission="CREATE_COPY">
5994                     <context link="call_number" field="owning_lib"/>
5995                 </create>
5996                 <retrieve/>
5997                 <update permission="UPDATE_COPY">
5998                     <context link="call_number" field="owning_lib"/>
5999                 </update>
6000                 <delete permission="DELETE_COPY">
6001                     <context link="call_number" field="owning_lib"/>
6002                 </delete>
6003             </actions>
6004         </permacrud>
6005         </class>
6006
6007         <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">
6008                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6009                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6010                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6011                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6012                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6013                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6014                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6015                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6016                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6017                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6018                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6019                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6020                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6021                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6022                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6023                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6024                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6025                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6026                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6027                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6028                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6029                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6030                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6031                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6032                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
6033                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6034                 </fields>
6035                 <links>
6036                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6037                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6038                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6039                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6040                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6041                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6042                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6043                 </links>
6044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6045                         <actions>
6046                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6047                                 <retrieve />
6048                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6049                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6050                         </actions>
6051                 </permacrud>
6052         </class>
6053
6054         <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">
6055                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6056                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6057                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6058                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6059                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6060                 </fields>
6061                 <links/>
6062         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6063             <actions>
6064                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6065                 <retrieve/>
6066                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6067                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6068             </actions>
6069         </permacrud>
6070         </class>
6071         <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">
6072                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6073                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6074                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6075                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6076                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6077                 </fields>
6078                 <links/>
6079         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6080             <actions>
6081                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6082                 <retrieve/>
6083                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6084                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6085             </actions>
6086         </permacrud>
6087         </class>
6088         <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">
6089                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6090                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6091                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6092                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6093                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6094                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6095                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6096                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6097                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6098                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6099                 </fields>
6100                 <links>
6101                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6102                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6103                 </links>
6104         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6105             <actions>
6106                 <create permission="CREATE_PERM" global_required="true"/>
6107                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6108                 <update permission="UPDATE_PERM" global_required="true"/>
6109                 <delete permission="DELETE_PERM" global_required="true"/>
6110             </actions>
6111         </permacrud>
6112         </class>
6113         <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">
6114                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6115                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6116                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6117                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6118                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6119                 </fields>
6120                 <links>
6121                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6122                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6123                 </links>
6124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6125             <actions>
6126                 <create permission="ADMIN_SURVEY">
6127                     <context link="question" jump="survey" field="owner"/>
6128                 </create>
6129                 <retrieve/>
6130                 <update permission="ADMIN_SURVEY">
6131                     <context link="question" jump="survey" field="owner"/>
6132                 </update>
6133                 <delete permission="ADMIN_SURVEY">
6134                     <context link="question" jump="survey" field="owner"/>
6135                 </delete>
6136             </actions>
6137         </permacrud>
6138         </class>
6139         <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">
6140                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6141                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6142                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6143                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6144                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6145                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6146                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6147                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6148                 </fields>
6149                 <links>
6150                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6151                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6152                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6153                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6154                 </links>
6155         </class>
6156         <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">
6157                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6158                         <field name="balance_owed" reporter:datatype="money" />
6159                         <field name="total_owed" reporter:datatype="money" />
6160                         <field name="total_paid" reporter:datatype="money" />
6161                         <field name="usr" reporter:datatype="link"/>
6162                 </fields>
6163                 <links>
6164                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6165                 </links>
6166         </class>
6167         <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">
6168                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6169                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6170                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6171                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6172                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6173                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6174                 </fields>
6175                 <links>
6176                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6177                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6178                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6179                 </links>
6180         </class>
6181         <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">
6182                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6183                         <field name="field" reporter:datatype="link"/>
6184                         <field name="id" reporter:datatype="id" />
6185                         <field name="source" reporter:datatype="link"/>
6186                         <field name="value" reporter:datatype="text"/>
6187                 </fields>
6188                 <links>
6189                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6190                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6191                 </links>
6192         </class>
6193         <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">
6194                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6195                         <field name="field" reporter:datatype="link"/>
6196                         <field name="id" reporter:datatype="id" />
6197                         <field name="source" reporter:datatype="link"/>
6198                         <field name="value" reporter:datatype="text"/>
6199                 </fields>
6200                 <links>
6201                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6202                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6203                 </links>
6204         </class>
6205         <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">
6206                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6207                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6208                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6209                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6210                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6211                 </fields>
6212                 <links>
6213                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6214                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6215                 </links>
6216         </class>
6217         <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">
6218                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6219                         <field name="depth" reporter:datatype="int" />
6220                         <field name="grantable" reporter:datatype="bool"/>
6221                         <field name="grp" reporter:datatype="link"/>
6222                         <field name="id" reporter:datatype="id" />
6223                         <field name="perm" reporter:datatype="link"/>
6224                 </fields>
6225                 <links>
6226                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6227                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6228                 </links>
6229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6230             <actions>
6231                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6232                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6233                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6234                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6235             </actions>
6236         </permacrud>
6237         </class>
6238         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6239                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6240                         <field name="items" oils_persist:virtual="true" />
6241                         <field name="btype" reporter:datatype="text"/>
6242                         <field name="id" reporter:datatype="id" />
6243                         <field name="name" reporter:datatype="text"/>
6244                         <field name="description" reporter:datatype="text"/>
6245                         <field name="owner" reporter:datatype="link"/>
6246                         <field name="pub" reporter:datatype="bool"/>
6247                         <field name="create_time" reporter:datatype="timestamp" />
6248                 </fields>
6249                 <links>
6250                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6251                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6252                 </links>
6253         </class>
6254         <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">
6255                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6256                         <field name="id" reporter:datatype="id" />
6257                         <field name="bucket" reporter:datatype="link"/>
6258                         <field name="note" reporter:datatype="text" />
6259                 </fields>
6260                 <links>
6261                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6262                 </links>
6263         </class>
6264         <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">
6265                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6266                         <field name="id" reporter:datatype="int" />
6267                         <field name="usr" reporter:datatype="link"/>
6268                         <field name="work_ou" reporter:datatype="link"/>
6269                 </fields>
6270                 <links>
6271                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6272                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6273                 </links>
6274         </class>
6275         <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">
6276                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6277                         <field name="depth" reporter:datatype="int"/>
6278                         <field name="grantable" reporter:datatype="bool"/>
6279                         <field name="id" reporter:datatype="id" />
6280                         <field name="perm" reporter:datatype="link"/>
6281                         <field name="usr" reporter:datatype="link"/>
6282                 </fields>
6283                 <links>
6284                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6285                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6286                 </links>
6287         </class>
6288         <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">
6289                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6290                         <field name="object_id" reporter:datatype="text"/>
6291                         <field name="grantable" reporter:datatype="bool"/>
6292                         <field name="id" reporter:datatype="id" />
6293                         <field name="perm" reporter:datatype="link"/>
6294                         <field name="usr" reporter:datatype="link"/>
6295                         <field name="object_type" reporter:datatype="text"/>
6296                 </fields>
6297                 <links>
6298                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6299                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6300                 </links>
6301         </class>
6302         <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">
6303                 <fields oils_persist:primary="id" oils_persist:sequence="">
6304                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6305                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6306                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6307                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6308                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6309                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6310                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6311                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6312                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6313                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6314                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6315                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6316                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6317                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6318                 </fields>
6319                 <links>
6320                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6321                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6322                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6323                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6324                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6325                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6326                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6327                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6328                 </links>
6329         </class>
6330         <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">
6331                 <fields oils_persist:primary="id" oils_persist:sequence="">
6332                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6333                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6334                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6335                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6336                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6337                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6338                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6339                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6340                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6341                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6342                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6343                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6344                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6345                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6346                 </fields>
6347                 <links>
6348                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6349                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6350                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6351                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6352                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6353                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6354                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6355                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6356                 </links>
6357         </class>
6358         <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">
6359                 <fields oils_persist:primary="id" oils_persist:sequence="">
6360                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6361                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6362                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6363                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6364                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6365                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6366                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6367                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6368                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6369                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6370                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6371                 </fields>
6372                 <links>
6373                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6374                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6375                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6376                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6377                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6378                 </links>
6379         </class>
6380         <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">
6381                 <fields oils_persist:primary="id" oils_persist:sequence="">
6382                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6383                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6384                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6385                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6386                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6387                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6388                         <field reporter:label="Accepting User" name="accepting_usr" />
6389                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6390                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6391                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6392                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6393                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6394                 </fields>
6395                 <links>
6396                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6397                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6398                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6399                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6400                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6401                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6402                 </links>
6403         </class>
6404         <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">
6405                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6406                         <field name="bucket" reporter:datatype="link"/>
6407                         <field name="id" reporter:datatype="id" />
6408                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6409                         <field name="create_time" reporter:datatype="timestamp" />
6410                         <field name="pos" reporter:datatype="int" />
6411                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6412                 </fields>
6413                 <links>
6414                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6415                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6416             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6417                 </links>
6418         </class>
6419         <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">
6420                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6421                         <field name="id" reporter:datatype="id" />
6422                         <field name="item" reporter:datatype="link"/>
6423                         <field name="note" reporter:datatype="text" />
6424                 </fields>
6425                 <links>
6426                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6427                 </links>
6428         </class>
6429         <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">
6430                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6431                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6432                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6433                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6434                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6435                 </fields>
6436                 <links>
6437                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6438                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6439                 </links>
6440         </class>
6441     <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">
6442         <fields oils_persist:primary="field">
6443             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6444             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6445             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6446         </fields>
6447         <links/>
6448         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6449             <actions>
6450                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6451                 <retrieve />
6452                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6453                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6454             </actions>
6455         </permacrud>
6456     </class>
6457         <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">
6458                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6459                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6460                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6461                 </fields>
6462                 <links/>
6463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6464             <actions>
6465                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6466                 <retrieve/>
6467                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6468                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6469             </actions>
6470         </permacrud>
6471         </class>
6472
6473
6474         <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">
6475                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6476                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6477                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6478                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6479                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6480                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6481                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6482                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6483                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6484                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6485                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6486                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6487                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6488                 </fields>
6489                 <links>
6490                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6491                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6492                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6493                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6494                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6495                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6496                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6497                 </links>
6498         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6499             <actions>
6500                 <create permission="TRANSIT_COPY">
6501                     <context link="target_copy" field="owner"/>
6502                 </create>
6503                 <retrieve/>
6504                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6505                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6506             </actions>
6507         </permacrud>
6508         </class>
6509         <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">
6510                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6511                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6512                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6513                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6514                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6515                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6516                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6517                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6518                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6519                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6520                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6521                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6522                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6523                 </fields>
6524                 <links>
6525                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6526                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6527                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6528                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6529                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6530                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6531                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6532                 </links>
6533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6534             <actions>
6535                 <create permission="TRANSIT_COPY" context_field="owner">
6536                     <context link="target_copy" field="circ_lib"/>
6537                 </create>
6538                 <retrieve/>
6539                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6540                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6541             </actions>
6542         </permacrud>
6543         </class>
6544         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6545                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6546                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6547                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6548                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6549                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6550                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6551                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6552                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6553                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6554                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6555                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6556                 </fields>
6557                 <links>
6558                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6559                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6560                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6561                 </links>
6562         </class>
6563         <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">
6564                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6565                         <field name="grp" />
6566                         <field name="id" reporter:datatype="id" />
6567                         <field name="usr" />
6568                 </fields>
6569                 <links>
6570                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6571                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6572                 </links>
6573         </class>
6574         <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">
6575                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6576                         <field name="id" reporter:datatype="id" />
6577                         <field name="fq_field" reporter:datatype="text"/>
6578                         <field name="identity_value" reporter:datatype="text"/>
6579                         <field name="translation" reporter:datatype="text"/>
6580                         <field name="string" reporter:datatype="text"/>
6581                 </fields>
6582                 <links>
6583                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6584                 </links>
6585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6586             <actions>
6587                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6588                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6589                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6590                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6591             </actions>
6592         </permacrud>
6593         </class>
6594         <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">
6595                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6596                         <field name="id" reporter:datatype="id" />
6597                         <field name="fm_class" reporter:datatype="text"/>
6598                         <field name="field" reporter:datatype="text"/>
6599                         <field name="owner" reporter:datatype="org_unit"/>
6600                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6601                 </fields>
6602                 <links>
6603                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6604                 </links>
6605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6606             <actions>
6607                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6608                 <retrieve/>
6609                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6610                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6611             </actions>
6612         </permacrud>
6613         </class>
6614         <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">
6615                 <fields oils_persist:primary="code">
6616                         <field name="code" reporter:datatype="id" />
6617                         <field name="marc_code" reporter:datatype="text"/>
6618                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6619                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6620                 </fields>
6621                 <links/>
6622         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6623             <actions>
6624                 <create permission="CREATE_LOCALE" global_required="true"/>
6625                 <retrieve/>
6626                 <update permission="UPDATE_LOCALE" global_required="true"/>
6627                 <delete permission="DELETE_LOCALE" global_required="true"/>
6628             </actions>
6629         </permacrud>
6630         </class>
6631         <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">
6632                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6633                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6634                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6635                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6636             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6637                 </fields>
6638                 <links>
6639                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6640                 </links>
6641         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6642             <actions>
6643                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6644                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6645                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6646                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6647             </actions>
6648         </permacrud>
6649         </class>
6650
6651         <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">
6652                 <fields oils_persist:primary="id">
6653                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6654                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6655                 </fields>
6656                 <links/>
6657         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6658             <actions>
6659                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6660                 <retrieve/>
6661                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6662                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6663             </actions>
6664         </permacrud>
6665         </class>
6666
6667         <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">
6668                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6669                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6670                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6671                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6672                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6673                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6674                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6675                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6676                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6677                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6678                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6679                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6680                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6681                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6682                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6683                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6684                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6685                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6686                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6687                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6688                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6689                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6690                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6691                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6692                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6693                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6694                 </fields>
6695                 <links>
6696                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6697                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6698                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6699                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6700                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6701                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6702                 </links>
6703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6704             <actions>
6705                 <create permission="user_request.create">
6706                     <context link="usr" field="home_ou"/>
6707                                 </create>
6708                 <retrieve permission="user_request.view">
6709                     <context link="usr" field="home_ou"/>
6710                                 </retrieve>
6711                 <update permission="user_request.update">
6712                     <context link="usr" field="home_ou"/>
6713                                 </update>
6714                 <delete permission="user_request.delete">
6715                     <context link="usr" field="home_ou"/>
6716                                 </delete>
6717             </actions>
6718         </permacrud>
6719         </class>
6720
6721         <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">
6722                 <fields oils_persist:primary="code">
6723                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6724                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6725                 </fields>
6726                 <links/>
6727         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6728             <actions>
6729                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6730                 <retrieve/>
6731                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6732                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6733             </actions>
6734         </permacrud>
6735         </class>
6736
6737         <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">
6738                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6739                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6740                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6741                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6742                         <field reporter:label="Ratio" name="ratio" />
6743                 </fields>
6744                 <links>
6745                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6746                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6747                 </links>
6748                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6749                         <actions>
6750                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6751                                 <retrieve/>
6752                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6753                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6754                         </actions>
6755                 </permacrud>
6756         </class>
6757
6758         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6759                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6760                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6761                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6762                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6763                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6764                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6765                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6766                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6767                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6768                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6769                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6770                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6771                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6772                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6773                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6774                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6775                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6776                 </fields>
6777                 <links>
6778                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6779                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6780             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6781             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6782             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6783                 </links>
6784         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6785             <actions>
6786                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6787                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6788                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6789                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6790             </actions>
6791         </permacrud>
6792         </class>
6793
6794         <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">
6795                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6796                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6797                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6798                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6799                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6800                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6801                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6802                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6803                 </fields>
6804                 <links>
6805                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6806                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6807                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6808                 </links>
6809         </class>
6810
6811         <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">
6812                 <fields oils_persist:primary="code">
6813                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6814                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6815                 </fields>
6816                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6817             <actions>
6818                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6819                 <retrieve/>
6820                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6821                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6822             </actions>
6823                 </permacrud>
6824         </class>
6825
6826         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6827                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6828                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6829                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6830                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6831                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6832                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6833                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6834                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6835                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6836                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6837                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6838                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6839                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6840                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6841                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6842                 </fields>
6843                 <links>
6844                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6845                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6846                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6847                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6848                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6849                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6850                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6851                 </links>
6852         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6853             <actions>
6854                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6855                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6856                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6857                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6858             </actions>
6859         </permacrud>
6860         </class>
6861
6862         <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">
6863                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6864                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6865                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6866                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6867                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6868                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6869                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6870                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6871                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6872                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6873                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6874                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6875                 </fields>
6876                 <links>
6877                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6878                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6879                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6880                 </links>
6881         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6882             <actions>
6883                 <create   permission="ADMIN_INVOICE">
6884                                         <context link="invoice" field="receiver"/>
6885                                 </create>
6886                 <retrieve permission="ADMIN_INVOICE">
6887                                         <context link="invoice" field="receiver"/>
6888                                 </retrieve>
6889                 <update   permission="ADMIN_INVOICE">
6890                                         <context link="invoice" field="receiver"/>
6891                                 </update>
6892                                 <delete   permission="ADMIN_INVOICE">
6893                                         <context link="invoice" field="receiver"/>
6894                                 </delete>
6895             </actions>
6896         </permacrud>
6897         </class>
6898
6899         <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">
6900                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6901                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6902                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6903                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6904                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6905                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6906                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6907                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6908                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6909                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6910                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6911                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6912                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6913                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6914                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6915                 </fields>
6916                 <links>
6917                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6918                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6919                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6920                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6921                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6922                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6923                 </links>
6924         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6925             <actions>
6926                 <create   permission="ADMIN_INVOICE">
6927                                         <context link="invoice" field="receiver"/>
6928                                 </create>
6929                 <retrieve permission="ADMIN_INVOICE">
6930                                         <context link="invoice" field="receiver"/>
6931                                 </retrieve>
6932                 <update   permission="ADMIN_INVOICE">
6933                                         <context link="invoice" field="receiver"/>
6934                                 </update>
6935                                 <delete   permission="ADMIN_INVOICE">
6936                                         <context link="invoice" field="receiver"/>
6937                                 </delete>
6938             </actions>
6939         </permacrud>
6940         </class>
6941
6942         <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">
6943                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6944                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6945                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6946                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6947                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6948                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6949                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6950                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6951                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6952                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6953                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6954                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6955                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6956                 </fields>
6957                 <links>
6958                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6959                 </links>
6960         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6961             <actions>
6962                 <create permission="ADMIN_PROVIDER">
6963                     <context link="provider" field="owner"/>
6964                 </create>
6965                 <retrieve permission="ADMIN_PROVIDER">
6966                     <context link="provider" field="owner"/>
6967                 </retrieve>
6968                 <update permission="ADMIN_PROVIDER">
6969                     <context link="provider" field="owner"/>
6970                 </update>
6971                 <delete permission="ADMIN_PROVIDER">
6972                     <context link="provider" field="owner"/>
6973                 </delete>
6974             </actions>
6975         </permacrud>
6976         </class>
6977
6978         <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">
6979                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6980                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6981                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6982                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6983                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6984                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6985                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6986         </fields>
6987                 <links>
6988                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6989                 </links>
6990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6991             <actions>
6992                 <create permission="ADMIN_PROVIDER">
6993                     <context link="provider" field="owner"/>
6994                 </create>
6995                 <retrieve permission="ADMIN_PROVIDER">
6996                     <context link="provider" field="owner"/>
6997                 </retrieve>
6998                 <update permission="ADMIN_PROVIDER">
6999                     <context link="provider" field="owner"/>
7000                 </update>
7001                 <delete permission="ADMIN_PROVIDER">
7002                     <context link="provider" field="owner"/>
7003                 </delete>
7004             </actions>
7005         </permacrud>
7006     </class>
7007         <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">
7008                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7009                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7010                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7011                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7012                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7013                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7014                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7015                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7016                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7017                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7018                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7019                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7020                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7021                 </fields>
7022                 <links>
7023                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7024                 </links>
7025         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7026             <actions>
7027                 <create permission="ADMIN_PROVIDER">
7028                     <context link="contact" jump='provider' field="owner"/>
7029                 </create>
7030                 <retrieve permission="ADMIN_PROVIDER">
7031                     <context link="contact" jump='provider' field="owner"/>
7032                 </retrieve>
7033                 <update permission="ADMIN_PROVIDER">
7034                     <context link="contact" jump='provider' field="owner"/>
7035                 </update>
7036                 <delete permission="ADMIN_PROVIDER">
7037                     <context link="contact" jump='provider' field="owner"/>
7038                 </delete>
7039             </actions>
7040         </permacrud>
7041         </class>
7042
7043         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7044                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7045                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7046                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7047                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7048                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7049                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7050                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7051                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7052                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7053                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7054                 </fields>
7055                 <links>
7056                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7057                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7058                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7059                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7060                 </links>
7061         </class>
7062
7063         <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">
7064                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7065                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7066                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7067                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7068                 </fields>
7069                 <links>
7070             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7071                 </links>
7072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7073                         <actions>
7074                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7075                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7076                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7077                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7078                         </actions>
7079                 </permacrud>
7080         </class>
7081
7082         <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">
7083                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7084                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7085                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7086                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7087                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7088                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7089                 </fields>
7090                 <links>
7091                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7092                 </links>
7093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7094                         <actions>
7095                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7096                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7097                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7098                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7099                         </actions>
7100                 </permacrud>
7101         </class>
7102
7103         <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">
7104                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7105                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7106                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7107                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7108                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7109                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7110                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7111                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7112                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7113                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7114                 </fields>
7115                 <links>
7116                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7117                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7118             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7119             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7120                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7121                 </links>
7122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7123             <actions>
7124                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7125                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7126                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7127                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7128             </actions>
7129         </permacrud>
7130         </class>
7131
7132         <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">
7133                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7134                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7135                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7136                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7137                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7138                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7139                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7140                 </fields>
7141                 <links>
7142                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7143                 </links>
7144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7145                         <actions>
7146                                 <create permission="ADMIN_FUNDING_SOURCE">
7147                     <context link="funding_source" field="owner"/>
7148                 </create>
7149                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7150                     <context link="funding_source" field="owner"/>
7151                 </retrieve>
7152                                 <update permission="ADMIN_FUNDING_SOURCE">
7153                     <context link="funding_source" field="owner"/>
7154                 </update>
7155                                 <delete permission="ADMIN_FUNDING_SOURCE">
7156                     <context link="funding_source" field="owner"/>
7157                 </delete>
7158                         </actions>
7159                 </permacrud>
7160         </class>
7161
7162         <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">
7163                 <fields oils_persist:primary="id">
7164                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7165                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7166                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7167                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7168                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7169                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7170                 </fields>
7171                 <links>
7172                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7173                 </links>
7174         </class>
7175
7176         <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">
7177                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7178                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7179                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7180                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7181                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7182                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7183                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7184                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7185                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7186                 </fields>
7187                 <links>
7188                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7189                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7190                 </links>
7191                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7192                         <actions>
7193                                 <create permission="ADMIN_ACQ_FUND">
7194                     <context link="fund" field="org"/>
7195                 </create>
7196                                 <retrieve permission="ADMIN_ACQ_FUND">
7197                     <context link="fund" field="org"/>
7198                 </retrieve>
7199                                 <update permission="ADMIN_ACQ_FUND">
7200                     <context link="fund" field="org"/>
7201                 </update>
7202                                 <delete permission="ADMIN_ACQ_FUND">
7203                     <context link="fund" field="org"/>
7204                 </delete>
7205                         </actions>
7206                 </permacrud>
7207         </class>
7208
7209         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7210                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7211                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7212                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7213                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7214                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7215                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7216                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7217                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7218                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7219                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7220                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7221                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7222                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7223                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7224                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7225                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7226                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7227                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7228                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7229                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7230                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7231                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7232                 </fields>
7233                 <links>
7234                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7235                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7236             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7237             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7238             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7239             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7240             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7241             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7242             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7243             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7244             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7245                 </links>
7246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7247             <actions>
7248                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7249                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7250                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7251                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7252             </actions>
7253         </permacrud>
7254         </class>
7255
7256         <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">
7257                 <fields oils_persist:primary="fund">
7258                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7259                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7260                 </fields>
7261                 <links>
7262                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7263                 </links>
7264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7265             <actions>
7266                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7267                                         <context link="fund" field="org" />
7268                 </retrieve>
7269             </actions>
7270         </permacrud>
7271         </class>
7272
7273         <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">
7274                 <fields oils_persist:primary="fund">
7275                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7276                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7277                 </fields>
7278                 <links>
7279                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7280                 </links>
7281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7282             <actions>
7283                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7284                                         <context link="fund" field="org" />
7285                 </retrieve>
7286             </actions>
7287         </permacrud>
7288         </class>
7289
7290         <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">
7291                 <fields oils_persist:primary="fund">
7292                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7293                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7294                 </fields>
7295                 <links>
7296                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7297                 </links>
7298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7299             <actions>
7300                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7301                                         <context link="fund" field="org" />
7302                 </retrieve>
7303             </actions>
7304         </permacrud>
7305         </class>
7306
7307         <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">
7308                 <fields oils_persist:primary="fund">
7309                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7310                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7311                 </fields>
7312                 <links>
7313                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7314                 </links>
7315         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7316             <actions>
7317                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7318                                         <context link="fund" field="org" />
7319                 </retrieve>
7320             </actions>
7321         </permacrud>
7322         </class>
7323
7324         <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">
7325                 <fields oils_persist:primary="fund">
7326                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7327                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7328                 </fields>
7329                 <links>
7330                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7331                 </links>
7332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7333             <actions>
7334                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7335                                         <context link="fund" field="org" />
7336                 </retrieve>
7337             </actions>
7338         </permacrud>
7339         </class>
7340
7341    <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">
7342         <fields oils_persist:primary="fund">
7343             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7344             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7345         </fields>
7346         <links>
7347             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7348         </links>
7349     </class>
7350
7351    <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">
7352         <fields oils_persist:primary="fund">
7353             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7354             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7355         </fields>
7356         <links>
7357             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7358         </links>
7359     </class>
7360
7361    <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">
7362         <fields oils_persist:primary="fund">
7363             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7364             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7365         </fields>
7366         <links>
7367             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7368         </links>
7369     </class>
7370
7371    <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">
7372         <fields oils_persist:primary="fund">
7373             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7374             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7375         </fields>
7376         <links>
7377             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7378         </links>
7379     </class>
7380
7381    <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">
7382         <fields oils_persist:primary="fund">
7383             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7384             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7385         </fields>
7386         <links>
7387             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7388         </links>
7389     </class>
7390
7391         <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">
7392                 <fields oils_persist:primary="funding_source">
7393                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7394                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7395                 </fields>
7396                 <links>
7397                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7398                 </links>
7399         </class>
7400
7401         <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">
7402                 <fields oils_persist:primary="funding_source">
7403                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7404                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7405                 </fields>
7406                 <links>
7407                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7408                 </links>
7409         </class>
7410
7411         <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">
7412                 <fields oils_persist:primary="funding_source">
7413                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7414                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7415                 </fields>
7416                 <links>
7417                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7418                 </links>
7419         </class>
7420
7421         <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">
7422                 <fields oils_persist:primary="fund">
7423                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7424                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7425                 </fields>
7426                 <links>
7427                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7428                 </links>
7429         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7430             <actions>
7431                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7432                                         <context link="fund" field="org" />
7433                 </retrieve>
7434             </actions>
7435         </permacrud>
7436     </class>
7437     <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">
7438         <oils_persist:source_definition><![CDATA[
7439             SELECT
7440                 acqf.*,
7441                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7442                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7443                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7444                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7445             FROM
7446                 acq.fund acqf
7447                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7448                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7449                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7450                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7451         ]]></oils_persist:source_definition>
7452         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7453             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7454             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7455             <field reporter:label="Name" name="name" reporter:datatype="text" />
7456             <field reporter:label="Year" name="year" reporter:datatype="int" />
7457             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7458             <field reporter:label="Code" name="code" reporter:datatype="text" />
7459             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7460             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7461             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7462             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7463             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7464
7465             <!-- non fund-native fields -->
7466             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7467             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7468             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7469             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7470         </fields>
7471         <links>
7472             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7473             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7474             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7475         </links>
7476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7477             <actions>
7478                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7479             </actions>
7480         </permacrud>
7481         </class>
7482         <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">
7483                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7484                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7485                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7486                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7487                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7488                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7489                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7490                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7491                 </fields>
7492                 <links>
7493                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7494                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7495                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7496                 </links>
7497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7498                         <actions>
7499                                 <create permission="ADMIN_ACQ_FUND">
7500                     <context link="fund" field="org"/>
7501                 </create>
7502                                 <retrieve permission="ADMIN_ACQ_FUND">
7503                     <context link="fund" field="org"/>
7504                 </retrieve>
7505                                 <update permission="ADMIN_ACQ_FUND">
7506                     <context link="fund" field="org"/>
7507                 </update>
7508                                 <delete permission="ADMIN_ACQ_FUND">
7509                     <context link="fund" field="org"/>
7510                 </delete>
7511                         </actions>
7512                 </permacrud>
7513         </class>
7514
7515     <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">
7516         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7517             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7518             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7519             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7520             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7521             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7522             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7523             <field reporter:label="Note" name="note" reporter:datatype="text" />
7524             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7525         </fields>
7526         <links>
7527             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7528             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7529             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7530         </links>
7531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7532                         <actions>
7533                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7534                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7535                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7536                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7537                         </actions>
7538                 </permacrud>
7539     </class>
7540
7541         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7542                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7543                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7544                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7545                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7546                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7547                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7548                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7549                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7550                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7551                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7552                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7553                 </fields>
7554                 <links>
7555                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7556                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7557                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7558                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7559                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7560                 </links>
7561                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7562                         <actions>
7563                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7564                         </actions>
7565                 </permacrud>
7566         </class>
7567
7568         <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">
7569                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7570                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7571                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7572                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7573                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7574                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7575                 </fields>
7576                 <links>
7577                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7578                 </links>
7579                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7580                         <actions>
7581                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7582                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7583                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7584                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7585                         </actions>
7586                 </permacrud>
7587         </class>
7588
7589         <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">
7590                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7591                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7592                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7593                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7594                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7595                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7596                         <field reporter:label="State" name="state" reporter:datatype="text" />
7597                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7598                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7599                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7600                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7601                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7602                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7603                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7604                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7605                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7606                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7607                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7608                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7609                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7610                 </fields>
7611                 <links>
7612                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7613                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7614                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7615                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7616                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7617                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7618                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7619                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7620                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7621                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7622                 </links>
7623                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7624                         <actions>
7625                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7626                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7627                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7628                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7629                         </actions>
7630                 </permacrud>
7631         </class>
7632
7633         <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">
7634                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7635                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7636                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7637                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7638                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7639                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7640                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7641                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7642                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7643                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7644                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7645                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7646                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7647                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7648                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7649                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7650                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7651                 </fields>
7652                 <links>
7653                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7654                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7655                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7656                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7657                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7658                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7659                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7660                 </links>
7661                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7662             <actions>
7663                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7664             </actions>
7665                 </permacrud>
7666         </class>
7667
7668         <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">
7669                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7670                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7671                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7672                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7673                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7674                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7675                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7676                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7677                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7678                 </fields>
7679                 <links>
7680                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7681                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7682                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7683                 </links>
7684                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7685             <actions>
7686                 <create permission="CREATE_PURCHASE_ORDER">
7687                     <context link="purchase_order" field="ordering_agency"/>
7688                 </create>
7689                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7690                     <context link="purchase_order" field="ordering_agency"/>
7691                 </retrieve>
7692                 <update permission="CREATE_PURCHASE_ORDER">
7693                     <context link="purchase_order" field="ordering_agency"/>
7694                 </update>
7695                 <delete permission="CREATE_PURCHASE_ORDER">
7696                     <context link="purchase_order" field="ordering_agency"/>
7697                 </delete>
7698             </actions>
7699                 </permacrud>
7700         </class>
7701
7702         <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">
7703                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7704                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7705                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7706                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7707                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7708                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7709                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7710                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7711                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7712                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7713                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7714                 </fields>
7715                 <links>
7716                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7717                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7718                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7719                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7720                 </links>
7721                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7722             <actions>
7723                 <create permission="CREATE_PURCHASE_ORDER">
7724                     <context link="purchase_order" field="ordering_agency"/>
7725                 </create>
7726                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7727                     <context link="purchase_order" field="ordering_agency"/>
7728                 </retrieve>
7729                 <update permission="CREATE_PURCHASE_ORDER">
7730                     <context link="purchase_order" field="ordering_agency"/>
7731                 </update>
7732                 <delete permission="CREATE_PURCHASE_ORDER">
7733                     <context link="purchase_order" field="ordering_agency"/>
7734                 </delete>
7735             </actions>
7736                 </permacrud>
7737         </class>
7738
7739         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7740                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7741                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7742                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7743                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7744                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7745                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7746                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7747                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7748                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7749                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7750                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7751                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7752                         <field reporter:label="State" name="state" reporter:datatype="text" />
7753                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7754                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7755                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7756                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7757                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7758                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7759                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7760                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7761                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7762                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7763                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7764                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7765                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7766                 </fields>
7767                 <links>
7768                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7769                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7770                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7771                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7772                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7773                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7774                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7775                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7776                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7777                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7778                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7779                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7780                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7781                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7782                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7783                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7784                 </links>
7785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7786                         <actions>
7787                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7788                                         <context link="purchase_order" field="ordering_agency"/>
7789                                         <context link="picklist" field="org_unit"/>
7790                                 </retrieve>
7791                         </actions>
7792                 </permacrud>
7793         </class>
7794
7795         <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">
7796                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7797                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7798                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7799                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7800                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7801                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7802                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7803                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7804                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7805                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7806                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7807                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7808                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7809                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7810                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7811                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7812                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7813                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7814                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7815                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7816                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7817                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7818                 </fields>
7819                 <links>
7820                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7821                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7822                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7823                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7824                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7825                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7826                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7827                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7828                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7829                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7830                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7831                 </links>
7832                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7833                         <actions>
7834                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7835                                         <context link="purchase_order" field="ordering_agency"/>
7836                                         <context link="picklist" field="org_unit"/>
7837                                 </retrieve>
7838                         </actions>
7839                 </permacrud>
7840         </class>
7841
7842         <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">
7843                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7844                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7845                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7846                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7847                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7848                 </fields>
7849                 <links>
7850                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7851                 </links>
7852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7853                         <actions>
7854                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7855                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7856                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7857                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7858                         </actions>
7859                 </permacrud>
7860         </class>
7861
7862         <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">
7863                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7864                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7865                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7866                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7867                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7868                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7869                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7870                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7871                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7872                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7873                 </fields>
7874                 <links>
7875                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7876                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7877                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7878                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7879                 </links>
7880         </class>
7881
7882         <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">
7883                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7884                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7885                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7886                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7887                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7888                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7889                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7890                 </fields>
7891                 <links>
7892                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7893                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7894                 </links>
7895         </class>
7896
7897         <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">
7898                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7899                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7900                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7901                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7902                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7903                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7904                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7905                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7906                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7907                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7908                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7909                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7910                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7911                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7912                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7913                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7914                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7915                 </fields>
7916                 <links>
7917                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7918                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7919                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7920                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7921                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7922                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7923                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7924                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7925                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7926                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7927                 </links>
7928         </class>
7929
7930         <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">
7931                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7932                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7933                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7934                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7935                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7936                 </fields>
7937                 <links/>
7938                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7939                         <actions>
7940                                 <retrieve />
7941                         </actions>
7942                 </permacrud>
7943         </class>
7944
7945         <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">
7946                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7947                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7948                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7949                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7950                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7951                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7952             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7953                 </fields>
7954                 <links/>
7955         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7956             <actions>
7957                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7958                 <retrieve />
7959                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7960                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7961             </actions>
7962         </permacrud>
7963         </class>
7964
7965         <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">
7966                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7967                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7968                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7969                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7970                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7971                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7972                 </fields>
7973                 <links/>
7974         </class>
7975         <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">
7976                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7977                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7978                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7979                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7980                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7981                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7982                 </fields>
7983                 <links>
7984                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7985                 </links>
7986         </class>
7987
7988         <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">
7989             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7990                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7991                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7992                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7993                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7994                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7995                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7996         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7997
7998             </fields>
7999             <links>
8000                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8001             </links>
8002             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8003                 <actions>
8004                     <create permission="ADMIN_PROVIDER">
8005                         <context link="provider" field="owner"/>
8006                     </create>
8007                     <retrieve permission="ADMIN_PROVIDER">
8008                         <context link="provider" field="owner"/>
8009                     </retrieve>
8010                     <update permission="ADMIN_PROVIDER">
8011                         <context link="provider" field="owner"/>
8012                     </update>
8013                     <delete permission="ADMIN_PROVIDER">
8014                         <context link="provider" field="owner"/>
8015                     </delete>
8016                 </actions>
8017             </permacrud>
8018         </class>
8019         
8020         <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">
8021             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8022                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8023                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8024                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8025                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8026             </fields>
8027             <links>
8028                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8029             </links>
8030             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8031                 <actions>
8032                     <create permission="ADMIN_PROVIDER">
8033                         <context link="provider" field="owner"/>
8034                     </create>
8035                     <retrieve permission="ADMIN_PROVIDER">
8036                         <context link="provider" field="owner"/>
8037                     </retrieve>
8038                     <update permission="ADMIN_PROVIDER">
8039                         <context link="provider" field="owner"/>
8040                     </update>
8041                     <delete permission="ADMIN_PROVIDER">
8042                         <context link="provider" field="owner"/>
8043                     </delete>
8044                 </actions>
8045             </permacrud>
8046         </class>
8047         
8048         <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">
8049             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8050                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8051                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8052                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8053                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8054                 </fields>
8055                 <links/>
8056         </class>
8057
8058         <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">
8059                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8060                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8061                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8062                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8063                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8064                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8065                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8066                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8067                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8068                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8069                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8070                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8071                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8072                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8073                 </fields>
8074                 <links>
8075                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8076                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8077                 </links>
8078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8079             <actions>
8080                 <create permission="ADMIN_PROVIDER">
8081                     <context link="provider" field="owner"/>
8082                 </create>
8083                 <retrieve permission="ADMIN_PROVIDER">
8084                     <context link="provider" field="owner"/>
8085                 </retrieve>
8086                 <update permission="ADMIN_PROVIDER">
8087                     <context link="provider" field="owner"/>
8088                 </update>
8089                 <delete permission="ADMIN_PROVIDER">
8090                     <context link="provider" field="owner"/>
8091                 </delete>
8092             </actions>
8093         </permacrud>
8094         </class>
8095
8096         <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">
8097                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8098                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8099                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8100                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8101                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8102                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8103                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8104                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8105                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8106                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8107                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8108                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8109                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8110                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8111                 </fields>
8112                 <links>
8113                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8114                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8115                 </links>
8116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8117             <actions>
8118                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8119                     <context link="account" jump="provider" field="owner"/>
8120                 </retrieve>
8121                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8122                     <context link="account" jump="provider" field="owner"/>
8123                 </update>
8124                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8125                     <context link="account" jump="provider" field="owner"/>
8126                 </delete>
8127             </actions>
8128         </permacrud>
8129         </class>
8130
8131
8132         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8133                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8134                         <field name="id" reporter:datatype="id" />
8135                         <field name="parent" reporter:datatype="link"/>
8136                         <field name="owner" reporter:datatype="link"/>
8137                         <field name="create_time" reporter:datatype="timestamp"/>
8138                         <field name="name" reporter:datatype="text"/>
8139                         <field name="shared" reporter:datatype="bool"/>
8140                         <field name="share_with" reporter:datatype="link"/>
8141                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8142                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8143                 </fields>
8144                 <links>
8145                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8146                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8147                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8148                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8149                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8150                 </links>
8151         </class>
8152         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8153                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8154                         <field name="id" reporter:datatype="id" />
8155                         <field name="parent" reporter:datatype="link"/>
8156                         <field name="owner" reporter:datatype="link"/>
8157                         <field name="create_time" reporter:datatype="timestamp"/>
8158                         <field name="name" reporter:datatype="text"/>
8159                         <field name="shared" reporter:datatype="bool"/>
8160                         <field name="share_with" reporter:datatype="link"/>
8161                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8162                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8163                 </fields>
8164                 <links>
8165                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8166                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8167                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8168                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8169                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8170                 </links>
8171         </class>
8172         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8173                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8174                         <field name="id" reporter:datatype="id" />
8175                         <field name="parent" reporter:datatype="link"/>
8176                         <field name="owner" reporter:datatype="link"/>
8177                         <field name="create_time" reporter:datatype="timestamp"/>
8178                         <field name="name" reporter:datatype="text"/>
8179                         <field name="shared" reporter:datatype="bool"/>
8180                         <field name="share_with" reporter:datatype="link"/>
8181                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8182                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8183                 </fields>
8184                 <links>
8185                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8186                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8187                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8188                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8189                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8190                 </links>
8191         </class>
8192         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8193                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8194                         <field name="id" reporter:datatype="id" />
8195                         <field name="owner" reporter:datatype="link"/>
8196                         <field name="create_time" reporter:datatype="timestamp"/>
8197                         <field name="name" reporter:datatype="text"/>
8198                         <field name="data" reporter:datatype="text"/>
8199                         <field name="folder" reporter:datatype="link"/>
8200                         <field name="description" reporter:datatype="text"/>
8201                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8202                 </fields>
8203                 <links>
8204                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8205                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8206                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8207                 </links>
8208         </class>
8209         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8210                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8211                         <field name="id" reporter:datatype="id" />
8212                         <field name="owner" reporter:datatype="link"/>
8213                         <field name="create_time" reporter:datatype="timestamp"/>
8214                         <field name="template" reporter:datatype="link"/>
8215                         <field name="data" reporter:datatype="text"/>
8216                         <field name="folder" reporter:datatype="link"/>
8217                         <field name="recur" reporter:datatype="bool"/>
8218                         <field name="recurrence" reporter:datatype="interval"/>
8219                         <field name="name" reporter:datatype="text"/>
8220                         <field name="description" reporter:datatype="text"/>
8221                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8222                 </fields>
8223                 <links>
8224                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8225                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8226                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8227                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8228                 </links>
8229         </class>
8230         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8231                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8232                         <field name="id" reporter:datatype="id" />
8233                         <field name="runner" reporter:datatype="link"/>
8234                         <field name="start_time" reporter:datatype="timestamp"/>
8235                         <field name="complete_time" reporter:datatype="timestamp"/>
8236                         <field name="run_time" reporter:datatype="timestamp"/>
8237                         <field name="email" reporter:datatype="text"/>
8238                         <field name="excel_format" reporter:datatype="bool"/>
8239                         <field name="csv_format" reporter:datatype="bool"/>
8240                         <field name="html_format" reporter:datatype="bool"/>
8241                         <field name="error_code" reporter:datatype="int"/>
8242                         <field name="error_text" reporter:datatype="text"/>
8243                         <field name="report" reporter:datatype="link"/>
8244                         <field name="folder" reporter:datatype="link"/>
8245                         <field name="chart_pie" reporter:datatype="bool"/>
8246                         <field name="chart_bar" reporter:datatype="bool"/>
8247                         <field name="chart_line" reporter:datatype="bool"/>
8248                 </fields>
8249                 <links>
8250                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8251                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8252                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8253                 </links>
8254         </class>
8255         <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">
8256                 <fields oils_persist:primary="id">
8257                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8258                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8259                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8260                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8261                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8262                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8263                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8264                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8265                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8266                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8267                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8268                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8269                 </fields>
8270                 <links>
8271                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8272                 </links>
8273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8274                         <actions>
8275                                 <retrieve />
8276                         </actions>
8277                 </permacrud>
8278         </class>
8279         <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">
8280                 <fields oils_persist:primary="id">
8281                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8282                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8283                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8284                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8285                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8286                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8287                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8288                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8289                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8290                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8291                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8292                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8293                 </fields>
8294                 <links>
8295                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8296                 </links>
8297         </class>
8298         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8299                 <fields oils_persist:primary="id">
8300                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8301                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8302                         <field reporter:label="Fingerprint" name="fingerprint" />
8303                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8304                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8305                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8306                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8307                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8308                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8309                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8310                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8311                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8312                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8313                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8314                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8315                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8316                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8317                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8318                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8319                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8320                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8321                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8322                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8323                 </fields>
8324                 <links>
8325                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8326                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8327                 </links>
8328         </class>
8329         <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">
8330                 <fields oils_persist:primary="id">
8331                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8332                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8333                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8334                 </fields>
8335                 <links>
8336                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8337                 </links>
8338         </class>
8339         <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">
8340                 <fields oils_persist:primary="id">
8341                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8342                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8343                 </fields>
8344                 <links>
8345                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8346                 </links>
8347         </class>
8348         <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">
8349                 <fields oils_persist:primary="id">
8350                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8351                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8352                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8353                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8354                 </fields>
8355                 <links>
8356                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8357                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8358                 </links>
8359         </class>
8360         <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">
8361                 <fields oils_persist:primary="xact">
8362                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8363                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8364                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8365                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8366                 </fields>
8367                 <links>
8368                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8369                 </links>
8370         </class>
8371         <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">
8372                 <fields oils_persist:primary="xact">
8373                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8374                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8375                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8376                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8377                 </fields>
8378                 <links>
8379                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8380                 </links>
8381         </class>
8382         <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)">
8383                 <fields oils_persist:primary="id">
8384                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8385                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8386                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8387                 </fields>
8388                 <links>
8389                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8390                 </links>
8391         </class>
8392         <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">
8393                 <fields oils_persist:primary="id">
8394                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8395                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8396                 </fields>
8397                 <links>
8398                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8399                 </links>
8400         </class>
8401         <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">
8402                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8403                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
8404                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8405                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8406                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8407                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8408                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8409                 </fields>
8410                 <links>
8411                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8412                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8413                 </links>
8414                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8415                         <actions>
8416                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8417                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8418                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8419                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8420                         </actions>
8421                 </permacrud>
8422         </class>
8423         <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">
8424                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8425                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8426                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8427                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8428                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8429                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8430                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8431                 </fields>
8432                 <links>
8433                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8434                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8435                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8436                 </links>
8437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8438                         <actions>
8439                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8440                                         <context link="formula" field="owner"/>
8441                                 </create>
8442                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8443                                         <context link="formula" field="owner"/>
8444                                 </retrieve>
8445                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8446                                         <context link="formula" field="owner"/>
8447                                 </update>
8448                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8449                                         <context link="formula" field="owner"/>
8450                                 </delete>
8451                         </actions>
8452                 </permacrud>
8453         </class>
8454
8455         <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">
8456                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8457                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8458                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8459                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8460                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8461                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8462                 </fields>
8463                 <links>
8464                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8465                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8466                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8467                 </links>
8468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8469                         <actions>
8470                                 <create permission="CREATE_PURCHASE_ORDER">
8471                                         <context link="formula" field="owner"/>
8472                 </create>
8473                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8474                                         <context link="formula" field="owner"/>
8475                 </retrieve>
8476                                 <update permission="CREATE_PURCHASE_ORDER">
8477                                         <context link="formula" field="owner"/>
8478                 </update>
8479                                 <delete permission="CREATE_PURCHASE_ORDER">
8480                                         <context link="formula" field="owner"/>
8481                 </delete>
8482                         </actions>
8483                 </permacrud>
8484         </class>
8485
8486         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8487                 <fields oils_persist:primary="id">
8488                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8489                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8490                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8491                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8492                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8493                 </fields>
8494                 <links>
8495                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8496                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8497                 </links>
8498         </class>
8499
8500         <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">
8501                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8502                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8503                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8504                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8505                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8506                 </fields>
8507                 <links>
8508                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8509                 </links>
8510                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8511                         <actions>
8512                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8513                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8514                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8515                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8516                         </actions>
8517                 </permacrud>
8518         </class>
8519
8520         <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">
8521                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8522                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8523                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8524                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8525                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8526                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8527                 </fields>
8528                 <links>
8529                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8530                 </links>
8531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8532                         <actions>
8533                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8534                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8535                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8536                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8537                         </actions>
8538                 </permacrud>
8539         </class>
8540
8541         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8542                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8543                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8544                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8545                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8546                 </fields>
8547                 <links>
8548                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8549                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8550                 </links>
8551         </class>
8552
8553         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8554                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8555                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8556                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8557                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8558                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8559                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8560                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8561                 </fields>
8562                 <links>
8563                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8564                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8565                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8566                 </links>
8567         </class>
8568
8569         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8570                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8571                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8572                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8573                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8574                 </fields>
8575                 <links>
8576                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8577                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8578                 </links>
8579         </class>
8580
8581         <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">
8582                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8583                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8584                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8585                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8586                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8587                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8588                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8589                 </fields>
8590                 <links>
8591                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8592                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8593                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8594                 </links>
8595         </class>
8596
8597         <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">
8598                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8599                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8600                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8601                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8602                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8603                 </fields>
8604                 <links>
8605                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8606                 </links>
8607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8608             <actions>
8609                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8610                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8611                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8612                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8613             </actions>
8614                 </permacrud>
8615         </class>
8616
8617         <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">
8618                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8619                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8620                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8621                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8622                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8623                 </fields>
8624                 <links>
8625                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8626                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8627                 </links>
8628                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8629                         <actions>
8630                                 <create permission="ADMIN_CLAIM_POLICY">
8631                                         <context link="claim_policy" field="org_unit"/>
8632                 </create>
8633                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8634                                         <context link="claim_policy" field="org_unit"/>
8635                 </retrieve>
8636                                 <update permission="ADMIN_CLAIM_POLICY">
8637                                         <context link="claim_policy" field="org_unit"/>
8638                 </update>
8639                                 <delete permission="ADMIN_CLAIM_POLICY">
8640                                         <context link="claim_policy" field="org_unit"/>
8641                 </delete>
8642                         </actions>
8643                 </permacrud>
8644         </class>
8645
8646     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8647         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8648             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8649             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8650             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8651             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8652             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8653             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8654             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8655             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8656             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8657             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8658             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8659             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8660             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8661             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8662             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8663         </fields>
8664     </class>
8665
8666     <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">
8667         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8668             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8669             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8670             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8671             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8672             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8673         </fields>
8674     </class>
8675
8676     <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">
8677         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8678             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8679             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8680             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8681             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8682             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8683             <field reporter:label="City" name="city" reporter:datatype="text"/>
8684             <field reporter:label="State" name="state" reporter:datatype="text"/>
8685             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8686             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8687             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8688         </fields>
8689     </class>
8690
8691     <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">
8692         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8693             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8694             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8695             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8696             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8697             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8698             <field reporter:label="City" name="city" reporter:datatype="text"/>
8699             <field reporter:label="State" name="state" reporter:datatype="text"/>
8700             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8701             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8702             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8703         </fields>
8704     </class>
8705
8706     <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">
8707         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8708             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8709             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8710             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8711             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8712             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8713             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8714         </fields>
8715     </class>
8716
8717         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8718                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8719                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8720                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8721                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8722                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8723                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8724                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8725                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8726                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8727                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8728                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8729                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8730                 </fields>
8731                 <links>
8732                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8733                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8734                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8735                 </links>
8736         </class>
8737
8738         <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">
8739                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8740                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8741                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8742                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8743                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8744                 </fields>
8745                 <links>
8746                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8747                 </links>
8748         </class>
8749
8750     <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">
8751         <fields>
8752             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8753             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8754             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8755         </fields>
8756                 <links>
8757                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8758                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8759                 </links>
8760     </class>
8761
8762     <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">
8763         <fields>
8764             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8765             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8766         </fields>
8767                 <links>
8768                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8769                 </links>
8770     </class>
8771
8772     <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">
8773         <fields>
8774             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8775             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8776             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8777         </fields>
8778                 <links>
8779                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8780                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8781                 </links>
8782     </class>
8783
8784     <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">
8785         <fields>
8786             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8787             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8788         </fields>
8789                 <links>
8790                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8791                 </links>
8792     </class>
8793
8794     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8795                 <oils_persist:source_definition>
8796
8797             SELECT  DISTINCT l.*
8798               FROM  action.unfulfilled_hold_loops l
8799                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8800               WHERE l.count = m.max
8801
8802                 </oils_persist:source_definition>
8803         <fields>
8804             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8805             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8806             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8807         </fields>
8808                 <links>
8809                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8810                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8811                 </links>
8812     </class>
8813
8814         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8815                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8816                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8817                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8818                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8819                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8820                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8821                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8822                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8823                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8824                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8825                 </fields>
8826                 <links>
8827                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8828                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8829                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8830                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8831                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8832                 </links>
8833         </class>
8834
8835         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8836                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8837                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8838                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8839                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8840                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8841                 </fields>
8842                 <links>
8843                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8844                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8845                 </links>
8846         </class>
8847
8848         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8849                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8850                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8851                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8852                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8853                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8854                 </fields>
8855                 <links>
8856                 </links>
8857         </class>
8858
8859         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8860                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8861                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8862                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8863                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8864                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8865                 </fields>
8866                 <links>
8867                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8868                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8869                 </links>
8870         </class>
8871         
8872         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8873                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8874                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8875                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8876                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8877                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8878                 </fields>
8879                 <links>
8880                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8881                 </links>
8882         </class>
8883         
8884         <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">
8885                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8886                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8887                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8888                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8889                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8890                 </fields>
8891                 <links>
8892                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8893                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8894                 </links>
8895         </class>
8896
8897         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8898                 <fields oils_persist:primary="name">
8899                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8900                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8901                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8902                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8903                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8904                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8905                 </fields>
8906                 <links>
8907                 </links>
8908         </class>
8909
8910         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8911                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8912                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8913                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8914                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8915                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8916                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8917                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8918                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8919                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8920                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8921                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8922                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8923                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8924                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8925                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8926                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8927                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8928                 </fields>
8929                 <links>
8930                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8931                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8932                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8933                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8934                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8935                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8936                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8937                 </links>
8938         </class>
8939
8940         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8941                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8942                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8943                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8944                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8945                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8946                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8947                 </fields>
8948                 <links>
8949                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8950                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8951                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8952                 </links>
8953         </class>
8954
8955         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8956                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8957                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8958                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8959                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8960                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8961                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8962                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8963                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8964                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8965                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8966                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8967                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8968                 </fields>
8969                 <links>
8970                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8971                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8972                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8973                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8974                 </links>
8975         </class>
8976
8977         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8978                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8979                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8980                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8981                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8982                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8983                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8984                 </fields>
8985                 <links>
8986                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8987                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8988                 </links>
8989         </class>
8990
8991         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8992                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8993                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8994                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8995                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8996                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8997                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8998                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8999                 </fields>
9000                 <links>
9001                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9002                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9003                 </links>
9004         </class>
9005
9006         <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">
9007                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9008                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9009                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9010                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9011                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9012                 </fields>
9013                 <links>
9014                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9015                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9016                 </links>
9017         </class>
9018
9019         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9020                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9021                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9022                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9023                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9024                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9025                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9026                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9027                 </fields>
9028                 <links>
9029                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9030                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9031                 </links>
9032         </class>
9033
9034         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9035                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9036                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9037                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9038                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9039                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9040                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9041                 </fields>
9042                 <links>
9043                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9044                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9045                 </links>
9046         </class>
9047
9048         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9049                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9050                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9051                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9052                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9053                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9054                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9055                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9056                 </fields>
9057                 <links>
9058                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9059                 </links>
9060         </class>
9061
9062         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9063                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9064                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9065                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9066                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9067                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9068                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9069                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9070                 </fields>
9071                 <links>
9072                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9073                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9074                 </links>
9075         </class>
9076
9077         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9078                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9079                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9080                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9081                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9082                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9083                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9084                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9085                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9086                 </fields>
9087                 <links>
9088                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9089                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9090                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9091                 </links>
9092         </class>
9093
9094         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9095                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9096                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9097                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9098                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9099                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9100                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9101                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9102                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9103                 </fields>
9104                 <links>
9105                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9106                 </links>
9107         </class>
9108
9109         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9110                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9111                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9112                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9113                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9114                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9115                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9116                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9117                 </fields>
9118                 <links>
9119                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9120                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9121                 </links>
9122         </class>
9123
9124         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9125                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9126                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9127                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9128                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9129                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9130                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9131                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9132                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9133                 </fields>
9134                 <links>
9135                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9136                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9137                 </links>
9138         </class>
9139
9140         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9141                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9142                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9143                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9144                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9145                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9146                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9147                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9148                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9149                 </fields>
9150                 <links>
9151                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9152                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9153                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9154                 </links>
9155         </class>
9156
9157         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9158                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9159                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9160                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9161                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9162                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9163                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9164                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9165                 </fields>
9166                 <links>
9167                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9168                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9169                 </links>
9170         </class>
9171
9172         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9173                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9174                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9175                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9176                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9177                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9178                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9179                 </fields>
9180                 <links>
9181                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9182                 </links>
9183         </class>
9184
9185         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9186                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9187                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9188                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9189                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9190                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9191                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9192                 </fields>
9193                 <links>
9194                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9195                 </links>
9196         </class>
9197
9198         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9199                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9200                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9201                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9202                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9203                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9204                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9205                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9206                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9207                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9208                 </fields>
9209                 <links>
9210                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9211                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9212                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9213                 </links>
9214         </class>
9215
9216         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9217                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9218                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9219                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9220                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9221                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9222                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9223                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9224                 </fields>
9225                 <links>
9226                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9227                 </links>
9228         </class>
9229
9230         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9231                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9232                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9233                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9234                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9235                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9236                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9237                 </fields>
9238                 <links>
9239                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9240                 </links>
9241         </class>
9242
9243         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9244                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9245                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9246                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9247                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9248                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9249                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9250                 </fields>
9251                 <links>
9252                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9253                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9254                 </links>
9255         </class>
9256
9257         <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">
9258                 <fields oils_persist:primary="id">
9259                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9260                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9261                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9262                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9263                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9264                 </fields>
9265                 <links>
9266                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9267                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9268                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9269                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9270                 </links>
9271         </class>
9272
9273         <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">
9274                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9275                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9276                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9277                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9278                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9279                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9280                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9281                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9282                 </fields>
9283                 <links/>
9284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9285                         <actions>
9286                                 <retrieve/>
9287                         </actions>
9288                 </permacrud>
9289         </class>
9290
9291         <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">
9292                 <fields oils_persist:primary="ptype_key">
9293                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9294                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9295                 </fields>
9296                 <links/>
9297                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9298                         <actions>
9299                                 <retrieve/>
9300                         </actions>
9301                 </permacrud>
9302         </class>
9303
9304         <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">
9305                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9306                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9307                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9308                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9309                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9310                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9311                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9312                 </fields>
9313                 <links>
9314                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9315                 </links>
9316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9317                         <actions>
9318                                 <retrieve/>
9319                         </actions>
9320                 </permacrud>
9321         </class>
9322
9323         <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">
9324                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9325                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9326                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9327                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9328                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9329                 </fields>
9330                 <links>
9331                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9332                 </links>
9333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9334                         <actions>
9335                                 <retrieve/>
9336                         </actions>
9337                 </permacrud>
9338         </class>
9339
9340     <class
9341         id="uvs"
9342         controller="open-ils.cstore open-ils.pcrud"
9343         oils_obj:fieldmapper="url_verify::session"
9344         oils_persist:tablename="url_verify.session"
9345         reporter:label="URL Verification Session"
9346     >
9347         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9348             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9349             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9350                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9351             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9352             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9353             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9354             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9355             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9356             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9357         </fields>
9358
9359         <links>
9360             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9361             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9362             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9363             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9364             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9365         </links>
9366
9367         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9368             <actions>
9369                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9370             </actions>
9371         </permacrud>
9372
9373     </class>
9374
9375     <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">
9376         <oils_persist:source_definition>
9377             SELECT
9378                 cbrebi.id AS id,  -- so we can have a pkey in our view
9379                 uvs.id AS session,
9380                 uvs.owning_lib,
9381                 cbrebi.target_biblio_record_entry
9382             FROM url_verify.session uvs
9383             JOIN container.biblio_record_entry_bucket cbreb
9384                 ON (uvs.container = cbreb.id)
9385             JOIN container.biblio_record_entry_bucket_item cbrebi
9386                 ON (cbrebi.bucket = cbreb.id)
9387         </oils_persist:source_definition>
9388         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9389             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9390             <field reporter:label="Session" name="session" reporter:datatype="link" />
9391             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9392             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9393         </fields>
9394         <links>
9395             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9396             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9397             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9398         </links>
9399         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9400             <actions>
9401                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9402             </actions>
9403         </permacrud>
9404     </class>
9405
9406     <class
9407         id="uvus"
9408         controller="open-ils.cstore open-ils.pcrud"
9409         oils_obj:fieldmapper="url_verify::url_selector"
9410         oils_persist:tablename="url_verify.url_selector"
9411         reporter:label="URL Verification URL Selector"
9412     >
9413         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9414             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9415             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9416                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9417             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9418         </fields>
9419
9420         <links>
9421             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9422             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9423         </links>
9424
9425         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9426             <actions>
9427                 <create permission="URL_VERIFY">
9428                     <context link="session" field="owning_lib"/>
9429                 </create>
9430                 <retrieve permission="URL_VERIFY">
9431                     <context link="session" field="owning_lib"/>
9432                 </retrieve>
9433                 <update permission="URL_VERIFY">
9434                     <context link="session" field="owning_lib"/>
9435                 </update>
9436                 <delete permission="URL_VERIFY">
9437                     <context link="session" field="owning_lib"/>
9438                 </delete>
9439             </actions>
9440         </permacrud>
9441
9442     </class>
9443
9444     <class
9445         id="uvu"
9446         controller="open-ils.cstore open-ils.pcrud"
9447         oils_obj:fieldmapper="url_verify::url"
9448         oils_persist:tablename="url_verify.url"
9449         reporter:label="URL Verification URL"
9450     >
9451         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9452             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9453                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9454                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9455                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9456                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9457             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9458             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9459             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9460             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9461             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9462             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9463             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9464             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9465             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9466             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9467             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9468             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9469             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9470         </fields>
9471
9472         <links>
9473             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9474             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9475             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9476             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9477             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9478         </links>
9479
9480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9481             <actions>
9482                 <create permission="URL_VERIFY">
9483                     <context link="session" field="owning_lib"/>
9484                 </create>
9485                 <retrieve permission="URL_VERIFY">
9486                     <context link="session" field="owning_lib"/>
9487                 </retrieve>
9488                 <update permission="URL_VERIFY">
9489                     <context link="session" field="owning_lib"/>
9490                 </update>
9491                 <delete permission="URL_VERIFY">
9492                     <context link="session" field="owning_lib"/>
9493                 </delete>
9494             </actions>
9495         </permacrud>
9496
9497     </class>
9498
9499     <class
9500         id="uvva"
9501         controller="open-ils.cstore open-ils.pcrud"
9502         oils_obj:fieldmapper="url_verify::verification_attempt"
9503         oils_persist:tablename="url_verify.verification_attempt"
9504         reporter:label="URL Verification Attempt"
9505     >
9506         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9507             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9508                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9509                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9510             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9511             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9512         </fields>
9513
9514         <links>
9515             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9516             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9517         </links>
9518
9519         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9520             <actions>
9521                 <create permission="URL_VERIFY">
9522                     <context link="session" field="owning_lib"/>
9523                 </create>
9524                 <retrieve permission="URL_VERIFY">
9525                     <context link="session" field="owning_lib"/>
9526                 </retrieve>
9527                 <update permission="URL_VERIFY">
9528                     <context link="session" field="owning_lib"/>
9529                 </update>
9530                 <delete permission="URL_VERIFY">
9531                     <context link="session" field="owning_lib"/>
9532                 </delete>
9533             </actions>
9534         </permacrud>
9535
9536     </class>
9537
9538     <class
9539         id="uvuv"
9540         controller="open-ils.cstore open-ils.pcrud"
9541         oils_obj:fieldmapper="url_verify::url_verification"
9542         oils_persist:tablename="url_verify.url_verification"
9543         reporter:label="URL Verification"
9544     >
9545         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9546             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9547                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9548                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9549             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9550             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9551             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9552             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9553                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9554         </fields>
9555
9556         <links>
9557             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9558             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9559             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9560         </links>
9561
9562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9563             <actions>
9564                 <create permission="URL_VERIFY">
9565                     <context link="attempt" jump="session" field="owning_lib"/>
9566                 </create>
9567                 <retrieve permission="URL_VERIFY">
9568                     <context link="attempt" jump="session" field="owning_lib"/>
9569                 </retrieve>
9570                 <update permission="URL_VERIFY">
9571                     <context link="attempt" jump="session" field="owning_lib"/>
9572                 </update>
9573                 <delete permission="URL_VERIFY">
9574                     <context link="attempt" jump="session" field="owning_lib"/>
9575                 </delete>
9576             </actions>
9577         </permacrud>
9578
9579     </class>
9580
9581         <class
9582                 id="cfdi"
9583                 controller="open-ils.cstore open-ils.pcrud"
9584                 oils_obj:fieldmapper="config::filter_dialog_interface"
9585                 oils_persist:tablename="config.filter_dialog_interface"
9586                 reporter:label="FilterDialog Interface">
9587                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9588                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9589                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9590                 </fields>
9591                 <links>
9592                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9593                 </links>
9594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9595                         <actions>
9596                                 <retrieve />
9597                         </actions>
9598                 </permacrud>
9599         </class>
9600
9601         <class
9602                 id="cfdfs"
9603                 controller="open-ils.cstore open-ils.pcrud"
9604                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9605                 oils_persist:tablename="config.filter_dialog_filter_set"
9606                 reporter:label="FilterDialog Filter Set">
9607                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9608                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9609                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9610                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9611                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9612                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9613                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9614                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9615                 </fields>
9616                 <links>
9617                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9618                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9619                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9620                 </links>
9621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9622                         <actions>
9623                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9624                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9625                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9626                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9627                         </actions>
9628                 </permacrud>
9629
9630         </class>
9631
9632         <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">
9633                 <fields oils_persist:primary="code">
9634                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9635                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9636                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9637                 </fields>
9638                 <links/>
9639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9640                         <actions>
9641                                 <retrieve/>
9642                         </actions>
9643                 </permacrud>
9644         </class>
9645
9646         <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">
9647                 <oils_persist:source_definition>
9648
9649             SELECT  b.id,
9650                     MAX(dcp.edit_date) AS last_delete_date
9651              FROM   biblio.record_entry b
9652                     JOIN asset.call_number cn ON (cn.record = b.id)
9653                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9654              WHERE  NOT b.deleted
9655              GROUP BY b.id
9656              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9657
9658                 </oils_persist:source_definition>
9659                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9660                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9661                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9662                 </fields>
9663                 <links>
9664                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9665                 </links>
9666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9667                         <actions>
9668                                 <retrieve/>
9669                         </actions>
9670                 </permacrud>
9671         </class>
9672
9673         <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">
9674                 <oils_persist:source_definition>
9675
9676             -- -- 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.
9677             -- -- 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
9678             -- -- may not.
9679             -- SELECT
9680             --     bre.id AS "bib_id",
9681             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9682             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9683             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9684             -- FROM (
9685                 SELECT
9686                     y.bre AS "id",
9687                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9688                     y.hold_count AS "hold_count",
9689                     (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"
9690                 FROM (
9691                         SELECT
9692                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9693                             COUNT(*) AS "hold_count"
9694                         FROM action.hold_request h
9695                         WHERE
9696                             cancel_time IS NULL
9697                             AND fulfillment_time IS NULL
9698                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9699                         GROUP BY 1
9700                     )y LEFT JOIN (
9701                         SELECT 
9702                             (SELECT id
9703                                 FROM biblio.record_entry 
9704                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9705                             ) AS "bre", 
9706                             COUNT(*) AS "copy_count"
9707                         FROM asset.copy
9708                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9709                         WHERE copy.holdable 
9710                             AND NOT copy.deleted 
9711                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9712                         GROUP BY 1
9713                     )x ON x.bre = y.bre
9714                 -- )z RIGHT JOIN (
9715                 --     SELECT id
9716                 --     FROM biblio.record_entry
9717                 --     WHERE NOT deleted
9718                 -- )bre ON (z.bib_id = bre.id)
9719                 
9720
9721                 </oils_persist:source_definition>
9722                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9723                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9724                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9725                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9726                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9727                 </fields>
9728                 <links>
9729                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9730                 </links>
9731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9732                         <actions>
9733                                 <retrieve/>
9734                         </actions>
9735                 </permacrud>
9736         </class>
9737
9738         <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">
9739                 <oils_persist:source_definition>
9740             SELECT *,
9741                 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,
9742                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9743             FROM
9744                 (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
9745                     FROM
9746                         action.hold_request ahr
9747                         JOIN reporter.hold_request_record rhrr USING (id)
9748                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9749                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9750                     WHERE
9751                         ahr.cancel_time IS NULL
9752                         AND ahr.fulfillment_time IS NULL
9753                     GROUP BY bib_record, pickup_lib
9754                 )x
9755                 JOIN
9756                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9757                     FROM
9758                         action.hold_request ahr
9759                         JOIN reporter.hold_request_record rhrr USING (id)
9760                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9761                     WHERE
9762                         ahr.cancel_time IS NULL
9763                         AND ahr.fulfillment_time IS NULL
9764                     GROUP BY bib_record
9765                 )y
9766                 USING (id)
9767                 </oils_persist:source_definition>
9768                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9769                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9770                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9771                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9772                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9773                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9774                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9775                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9776                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9777                 </fields>
9778                 <links>
9779                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9780                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9781                 </links>
9782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9783                         <actions>
9784                                 <retrieve/>
9785                         </actions>
9786                 </permacrud>
9787         </class>
9788
9789         <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">
9790                 <oils_persist:source_definition>
9791             SELECT
9792                 ac.id,
9793                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9794                 MAX(actac.xact_start) AS last_circ
9795             FROM asset.copy ac
9796                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9797             GROUP BY ac.id
9798
9799             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9800             --SELECT
9801             --    ac.id,
9802             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9803             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9804             --FROM asset.copy ac
9805             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9806             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9807             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9808                 </oils_persist:source_definition>
9809                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9810                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9811                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9812                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9813                 </fields>
9814                 <links>
9815                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9816                 </links>
9817                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9818                         <actions>
9819                                 <retrieve/>
9820                         </actions>
9821                 </permacrud>
9822         </class>
9823
9824         <!-- ********************************************************************************************************************* -->
9825         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9826         <!-- ********************************************************************************************************************* -->
9827         <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">
9828                 <fields oils_persist:primary="id">
9829                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9830                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9831                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9832                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9833                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9834                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
9835                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9836                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
9837                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
9838                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
9839                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
9840                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
9841                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
9842                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
9843                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9844                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
9845                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
9846                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
9847                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
9848                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
9849                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
9850                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
9851                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
9852                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
9853                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
9854                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
9855                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
9856                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
9857                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
9858                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9859                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9860                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9861                 </fields>
9862                 <links>
9863                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9864                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
9865                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
9866                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
9867                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
9868                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
9869                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
9870                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
9871                 </links>
9872         </class>
9873
9874         <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">
9875                 <fields oils_persist:primary="id">
9876                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9877                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9878                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9879                 </fields>
9880                 <links>
9881                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9882                 </links>
9883         </class>
9884
9885         <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">
9886                 <fields oils_persist:primary="id">
9887                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9888                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9889                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9890                 </fields>
9891                 <links>
9892                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9893                 </links>
9894         </class>
9895
9896         <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">
9897                 <fields oils_persist:primary="id">
9898                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
9899
9900                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
9901                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
9902                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
9903
9904                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
9905                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
9906                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
9907
9908                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
9909                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
9910
9911                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9912                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
9913                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
9914
9915                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
9916                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
9917
9918                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
9919                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
9920                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
9921
9922                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
9923                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
9924                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
9925
9926                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9927                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
9928                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
9929                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
9930
9931                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
9932                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
9933
9934                 </fields>
9935                 <links>
9936                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
9937                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9938                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
9939                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
9940                 </links>
9941         </class>
9942
9943         <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">
9944                 <oils_persist:source_definition>
9945
9946             SELECT
9947                 po.ordering_agency AS ordering_agency,
9948                 po.id AS purchase_order,
9949                 li.id AS lineitem,
9950                 lid.id AS lineitem_detail,
9951                 cpa.id AS claim_policy_action
9952             FROM
9953                 acq.lineitem_detail lid
9954                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
9955                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
9956                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
9957                 JOIN acq.claim_policy_action cpa ON (
9958                     cpa.claim_policy = cp.id
9959
9960                     -- we only care about claim policy actions whose claim
9961                     -- interval we'd reached or exceeded
9962                     AND (NOW() - cpa.action_interval) &gt; po.order_date
9963
9964                     -- filter out all claim policy actions where claim events
9965                     -- have occurred on or after the action's action_interval
9966                     AND NOT EXISTS (
9967                         SELECT 1
9968                         FROM
9969                             acq.claim_event evt
9970                             JOIN acq.claim claim ON (
9971                                 claim.id = evt.claim
9972                                 AND claim.lineitem_detail = lid.id
9973                             )
9974                         WHERE
9975                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
9976                     )
9977                 )
9978             WHERE
9979                 lid.cancel_reason IS NULL
9980                 AND li.cancel_reason IS NULL -- belt/suspenders
9981                 AND po.cancel_reason IS NULL -- belt/suspenders
9982                 AND lid.recv_time IS NULL
9983                 AND po.state = 'on-order'
9984             ORDER BY 1, 2, 3, 4, 5
9985
9986                 </oils_persist:source_definition>
9987                 <fields>
9988                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9989                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9990                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9991                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9992                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9993                 </fields>
9994                 <links>
9995                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9996                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9997                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9998                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9999                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10000                 </links>
10001         </class>
10002         <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">
10003                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10004                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10005                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10006                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10007                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10008                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10009                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10010                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10011                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10012                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10013                 </fields>
10014                 <links>
10015                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10016                 </links>
10017     </class>
10018         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10019                 <oils_persist:source_definition>
10020             SELECT * FROM acq.lineitem_summary 
10021                                 WHERE item_count > (invoice_count + cancel_count)
10022         </oils_persist:source_definition>
10023                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10024                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10025                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10026                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10027                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10028                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10029                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10030                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10031                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10032                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10033                 </fields>
10034                 <links>
10035                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10036                 </links>
10037     </class>
10038         <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">
10039                 <oils_persist:source_definition>
10040
10041                         SELECT  t.*
10042                           FROM  action.transit_copy t
10043                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10044                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10045                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10046
10047                 </oils_persist:source_definition>
10048                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10049                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10050                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10051                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10052                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10053                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10054                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10055                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10056                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10057                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10058                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10059                 </fields>
10060                 <links>
10061                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10062                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10063                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10064                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10065                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10066                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10067                 </links>
10068         </class>
10069
10070     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10071                 <oils_persist:source_definition>
10072
10073         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10074                 SELECT
10075                         cp.id as copy,
10076                         COUNT(circ.id),
10077                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10078                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10079                 FROM
10080                         asset.copy cp
10081                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10082                 GROUP BY 1, 3, 4
10083                 UNION
10084                 SELECT
10085                         cp.id as copy,
10086                         COUNT(circ.id),
10087                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10088                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10089                 FROM
10090                         asset.copy cp
10091                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10092                 GROUP BY 1, 3, 4
10093                 UNION
10094                 SELECT
10095                         id as copy,
10096                         circ_count,
10097                         -1 AS year,
10098                         false as is_renewal
10099                 FROM
10100                         extend_reporter.legacy_circ_count
10101         )x GROUP BY 1, 3, 4
10102
10103                 </oils_persist:source_definition>
10104         <fields>
10105             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10106             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10107             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10108             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10109         </fields>
10110                 <links>
10111                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10112                 </links>
10113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10114                         <actions>
10115                                 <retrieve/>
10116                         </actions>
10117                 </permacrud>
10118     </class>
10119
10120         <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">
10121                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10122                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10123                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10124                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10125                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10126                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10127                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10128                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10129                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10130                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10131                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10132                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10133                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10134                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10135                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10136                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10137                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10138                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10139                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10140                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10141                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10142                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10143                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10144                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10145                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10146                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10147                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10148                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10149                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10150                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10151                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10152                 </fields>
10153                 <links>
10154                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10155                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10156                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10157                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10158                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10159                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10160                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10161                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10162                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10163                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10164                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10165                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10166                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10167                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10168                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10169                 </links>
10170         </class>
10171
10172     <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">
10173         <fields oils_persist:primary="id">
10174             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10175             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10176             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10177             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10178             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10179             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10180             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10181             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10182             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10183             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10184             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10185             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10186             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10187             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10188             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10189             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10190             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10191             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10192             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10193             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10194             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10195             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10196             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10197             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10198             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10199             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10200             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10201             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10202             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10203             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10204             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10205             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10206             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10207             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10208         </fields>
10209         <links>
10210             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10211             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10212             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10213             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10214             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10215         </links>
10216     </class>
10217
10218     <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">
10219         <fields oils_persist:primary="id">
10220             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10221             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10222             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10223             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10224         </fields>
10225         <links>
10226             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10227             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10228         </links>
10229     </class>
10230
10231     <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">
10232         <fields oils_persist:primary="owning_lib">
10233             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10234             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10235             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10236         </fields>
10237         <links>
10238             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10239         </links>
10240     </class>
10241
10242     <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">
10243         <fields oils_persist:primary="id">
10244             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10245             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10246             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10247             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10248             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10249         </fields>
10250         <links>
10251             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10252             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10253             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10254         </links>
10255     </class>
10256
10257     <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">
10258         <fields oils_persist:primary="circ_lib">
10259             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10260             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10261             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10262             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10263         </fields>
10264         <links>
10265             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10266             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10267         </links>
10268     </class>
10269
10270     <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">
10271         <fields oils_persist:primary="id">
10272             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10273             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10274             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10275             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10276             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10277         </fields>
10278         <links>
10279             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10280             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10281             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10282         </links>
10283     </class>
10284
10285     <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">
10286         <fields oils_persist:primary="home_ou">
10287             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10288             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10289             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10290             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10291         </fields>
10292         <links>
10293             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10294             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10295         </links>
10296     </class>
10297         <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">
10298                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10299                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10300                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10301                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10302                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10303                 </fields>
10304                 <links>
10305                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10306                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10307                 </links>
10308                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10309                         <actions>
10310                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10311                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10312                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10313                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10314                         </actions>
10315                 </permacrud>
10316         </class>
10317         <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">
10318                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10319                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10320                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10321                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10322                 </fields>
10323                 <links>
10324                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10325                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10326                         </links>
10327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10328                 <actions>
10329                                 <create permission="ADMIN_ACQ_FUND_TAG">
10330                                         <context link="tag" field="owner"/>
10331                                 </create>
10332                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10333                                         <context link="tag" field="owner"/>
10334                                 </retrieve>
10335                                 <update permission="ADMIN_ACQ_FUND_TAG">
10336                                         <context link="tag" field="owner"/>
10337                                 </update>
10338                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10339                                         <context link="tag" field="owner"/>
10340                                 </delete>
10341                         </actions>
10342                 </permacrud>
10343         </class>
10344         <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">
10345                 <oils_persist:source_definition><![CDATA[
10346                 SELECT
10347                         poi.purchase_order AS purchase_order,
10348                         ii.invoice AS invoice,
10349                         NULL AS lineitem,
10350                         poi.id AS po_item,
10351                         NULL AS picklist
10352                 FROM
10353                         acq.po_item poi
10354                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10355                 UNION SELECT
10356                         jub.purchase_order AS purchase_order,
10357                         ie.invoice AS invoice,
10358                         jub.id AS lineitem,
10359                         NULL AS po_item,
10360                         jub.picklist AS picklist
10361                 FROM
10362                         acq.lineitem jub
10363                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10364                 UNION SELECT
10365                         ii.purchase_order AS purchase_order,
10366                         ii.invoice AS invoice,
10367                         NULL AS lineitem,
10368                         NULL AS po_item,
10369                         NULL AS picklist
10370                 FROM
10371                         acq.invoice_item ii
10372                 WHERE ii.po_item IS NULL
10373                 UNION SELECT
10374                         ie.purchase_order AS purchase_order,
10375                         ie.invoice AS invoice,
10376                         NULL AS lineitem,
10377                         NULL AS po_item,
10378                         NULL AS picklist
10379                 FROM
10380                         acq.invoice_entry ie
10381                 WHERE ie.lineitem IS NULL
10382                 UNION SELECT
10383                         NULL AS purchase_order,
10384                         NULL AS invoice,
10385                         jub.id AS lineitem,
10386                         NULL AS po_item,
10387                         jub.picklist AS picklist
10388                 FROM
10389                         acq.lineitem jub
10390                 WHERE jub.purchase_order IS NULL
10391                 ]]></oils_persist:source_definition>
10392                 <fields>
10393                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10394                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10395                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10396                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10397                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10398                 </fields>
10399                 <links>
10400                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10401                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10402                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10403                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10404                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10405                 </links>
10406         </class>
10407         <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">
10408                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10409                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10410                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10411                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10412                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10413                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10414                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10415                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10416                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10417                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10418                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10419                 </fields>
10420                 <links>
10421                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10422                 </links>
10423                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10424                         <actions>
10425                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10426                                 <retrieve/>
10427                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10428                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10429                         </actions>
10430                 </permacrud>
10431         </class>
10432
10433         <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">
10434                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10435                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10436                         <field name="date_applied" reporter:datatype="timestamp"/>
10437                         <field name="org" reporter:datatype="org_unit"/>
10438                         <field name="original_value" reporter:datatype="text"/>
10439                         <field name="new_value" reporter:datatype="text"/>
10440                         <field name="field_name" reporter:datatype="link"/>
10441                 </fields>
10442                 <links>
10443                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10444                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10445                 </links>
10446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10447                         <actions>
10448                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10449                                 <retrieve/>
10450                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10451                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10452                         </actions>
10453                 </permacrud>
10454         </class>
10455         <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">
10456                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10457                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10458                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10459                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10460                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10461                 </fields>
10462                 <links>
10463                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10464                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10465                 </links>
10466         </class>
10467         <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">
10468                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10469                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10470                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10471                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10472                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10473                 </fields>
10474                 <links>
10475                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10476                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10477                 </links>
10478         </class>
10479
10480
10481         <!-- ********************************************************************************************************************* -->
10482
10483 </IDL>
10484
10485 <!--
10486     vim:noet:ts=4:sw=4:
10487 -->