]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Adds two missing link fields (patron profile and patron home library) to
[Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                 </fields>
204                 <links>
205                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
206                 </links>
207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
208                         <actions>
209                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
210                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
211                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
212                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
213                         </actions>
214                 </permacrud>
215         </class>
216
217         <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">
218                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
219                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
220                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
221                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
222                 </fields>
223                 <links>
224                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
225                 </links>
226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
227                         <actions>
228                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
229                     <context link="grp" field="owner"/>
230                 </create>
231                                 <retrieve/>
232                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
233                     <context link="grp" field="owner"/>
234                 </update>
235                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
236                     <context link="grp" field="owner"/>
237                 </delete>
238                         </actions>
239                 </permacrud>
240         </class>
241
242         <class  id="vibtg" 
243             controller="open-ils.cstore open-ils.pcrud" 
244             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
245             oils_persist:tablename="vandelay.import_bib_trash_group" 
246             reporter:label="Import/Overlay Field Groups for Removal">
247                 <fields oils_persist:primary="id" 
248                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
249                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
250                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
251                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
252                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
253                 </fields>
254                 <links>
255                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
256                 </links>
257                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
258                         <actions>
259                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
260                                 <retrieve/>
261                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
263                         </actions>
264                 </permacrud>
265         </class>
266
267
268         <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">
269                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
270                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
271                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
272                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
273                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
274                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
275                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
276                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
277                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
278                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
279                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
280                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
281                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
282                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
283                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
284                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
285                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
286                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
287                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
288                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
289                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
290                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
291                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
292                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
293                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
294                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
295                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
296                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
297                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
298                 </fields>
299                 <links>
300                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
301                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
302                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
303                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
304                 </links>
305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
306                         <actions>
307                                 <create permission="CREATE_IMPORT_ITEM">
308                     <context link="definition" field="owner"/>
309                                 </create>
310                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
311                     <context link="definition" field="owner"/>
312                                 </retrieve>
313                                 <update permission="UPDATE_IMPORT_ITEM">
314                     <context link="definition" field="owner"/>
315                                 </update>
316                                 <delete permission="DELETE_IMPORT_ITEM">
317                     <context link="definition" field="owner"/>
318                                 </delete>
319                         </actions>
320                 </permacrud>
321         </class>
322
323         <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">
324                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
325                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
326                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
327                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
328                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
329                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
330                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
331                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
332                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
333                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
334                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
335                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
336                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
337                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
338                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
339                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
340                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
341                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
342                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
343                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
344                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
345                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
346                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
347                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
348                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
349                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
350                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
351                 </fields>
352                 <links>
353                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
354                 </links>
355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
356                         <actions>
357                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
358                                 <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"/>
359                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
360                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
361                         </actions>
362                 </permacrud>
363         </class>
364
365         <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">
366                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
367                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
368                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
369                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
370                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
371                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
372                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
373                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
374                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
375                 </fields>
376                 <links>
377                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
378                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
379                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
380                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
381                 </links>
382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
383                         <actions>
384                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
385                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
386                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
387                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
388                         </actions>
389                 </permacrud>
390         </class>
391
392         <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">
393                 <fields oils_persist:primary="code">
394                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
395                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
396                 </fields>
397                 <links>
398                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
399                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
400                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
401                 </links>
402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
403                         <actions>
404                                 <retrieve/>
405                         </actions>
406                 </permacrud>
407         </class>
408
409         <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">
410                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
411                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
412                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
413                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
414                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
415                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
416                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
417                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
418                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
419                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
420                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
421                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
422                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
423                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
424                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
425                 </fields>
426                 <links>
427                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
428                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
429                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
430                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
431             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
432             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
433             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
434                 </links>
435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
436                         <actions>
437                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
438                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
439                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
440                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
441                         </actions>
442                 </permacrud>
443         </class>
444
445         <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">
446                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
447                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
448                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
449                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
450                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
451                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
452                 </fields>
453                 <links/>
454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
455                         <actions>
456                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
457                 <retrieve/>
458                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
459                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
460                         </actions>
461                 </permacrud>
462         </class>
463
464         <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">
465                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
466                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
467                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
468                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
469                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
470                 </fields>
471                 <links>
472                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
473                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
474                 </links>
475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
476                         <actions>
477                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
478                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
481                         </actions>
482                 </permacrud>
483         </class>
484
485         <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">
486                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
487                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
488                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
489                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
490                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
491                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
492                 </fields>
493                 <links>
494                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
495                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
496                 </links>
497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
498                         <actions>
499                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
500                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
501                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
502                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
503                         </actions>
504                 </permacrud>
505         </class>
506
507         <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">
508                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
509                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
510                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
511                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
512                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
513                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
514                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
515                 </fields>
516                 <links>
517                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
518                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
519                 </links>
520                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
521                         <actions>
522                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
524                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
525                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
526                         </actions>
527                 </permacrud>
528         </class>
529
530         <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">
531                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
532                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
533                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
534                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
535                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
536                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
537                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
538                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
539                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
540                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
541                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
542                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
543                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
544                 </fields>
545                 <links>
546                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
547                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
548                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
549             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
550             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
551                 </links>
552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
553                         <actions>
554                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
556                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
557                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
558                         </actions>
559                 </permacrud>
560         </class>
561
562         <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">
563                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
564                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
565                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
566                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
567                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
568                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
569                 </fields>
570                 <links/>
571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
572                         <actions>
573                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                 <retrieve/>
575                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
576                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
577                         </actions>
578                 </permacrud>
579         </class>
580
581         <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">
582                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
583                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
584                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
585                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
586                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
587                 </fields>
588                 <links>
589                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
590                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
591                 </links>
592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
593                         <actions>
594                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
596                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
597                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
598                         </actions>
599                 </permacrud>
600         </class>
601
602         <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">
603                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
604                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
605                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
606                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
607                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
608                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
609                 </fields>
610                 <links>
611                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
612                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <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">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
626                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
627                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
628                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
629                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
630                 </fields>
631                 <links>
632                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
633                 </links>
634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
635                         <actions>
636                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
637                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
638                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
639                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
640                         </actions>
641                 </permacrud>
642         </class>
643
644         <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">
645                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
646                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
647                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
648                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
649                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
650                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
651                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
652                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
653             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
654                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
655                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
656                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
657                 </fields>
658                 <links>
659                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
660                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
661                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
662                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
663                 </links>
664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
665                         <actions>
666                                 <create permission="ADMIN_IMPORT_MATCH_SET">
667                     <context link="match_set" field="owner"/>
668                                 </create>
669                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
670                     <context link="match_set" field="owner"/>
671                                 </retrieve>
672                                 <update permission="ADMIN_IMPORT_MATCH_SET">
673                     <context link="match_set" field="owner"/>
674                                 </update>
675                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
676                     <context link="match_set" field="owner"/>
677                                 </delete>
678                         </actions>
679                 </permacrud>
680         </class>
681
682         <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">
683                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
684                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
685                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
686                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
687                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
688                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
689                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
690                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
691                 </fields>
692                 <links>
693                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
694                 </links>
695                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
696                         <actions>
697                                 <create permission="ADMIN_IMPORT_MATCH_SET">
698                     <context link="match_set" field="owner"/>
699                                 </create>
700                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
701                     <context link="match_set" field="owner"/>
702                                 </retrieve>
703                                 <update permission="ADMIN_IMPORT_MATCH_SET">
704                     <context link="match_set" field="owner"/>
705                                 </update>
706                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
707                     <context link="match_set" field="owner"/>
708                                 </delete>
709                         </actions>
710                 </permacrud>
711         </class>
712
713         <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">
714                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
715                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
716                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
717                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
718                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
719                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
720                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
721                 </fields>
722                 <links>
723                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
724                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
725                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
726                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
727                 </links>
728         </class>
729
730     <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">
731         <fields oils_persist:primary="name">
732             <field reporter:label="Name" name="name" reporter:datatype="text"/>
733             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
734             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
735             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
736         </fields>
737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
738             <actions>
739                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
740                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
741                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
742                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
743             </actions>
744         </permacrud>
745     </class>
746
747     <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">
748         <fields oils_persist:primary="id">
749             <field reporter:label="ID" name="id" reporter:datatype="id"/>
750             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
751             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
752             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
753             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
754         </fields>
755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756             <actions>
757                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
758                 <retrieve/>
759                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
760                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
761             </actions>
762         </permacrud>
763     </class>
764
765         <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">
766                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
767                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
768                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
769                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
770                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
771                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
772                 </fields>
773                 <links>
774                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
775                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
776                 </links>
777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
778             <actions>
779                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780                 <retrieve/>
781                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
782                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
783             </actions>
784         </permacrud>
785         </class>
786
787         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
788                 <fields oils_persist:primary="id">
789                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
790                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
791                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
792         </fields>
793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
794             <actions>
795                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
796                 <retrieve/>
797                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
798                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
799             </actions>
800         </permacrud>
801         </class>
802
803         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
804                 <fields oils_persist:primary="id">
805                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
806                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />
807                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />
808                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />
809                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
810                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
811                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
812                         <field reporter:label="Repeatabl?" name="repeatable" reporter:datatype="bool"/>
813                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
814                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
815                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
816         </fields>
817                 <links>
818                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
819                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
820         </links>
821         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
822             <actions>
823                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
824                 <retrieve/>
825                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
826                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
827             </actions>
828         </permacrud>
829         </class>
830
831         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
832                 <fields oils_persist:primary="id">
833                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
834                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />
835                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />
836                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />
837                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" />
838                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
839                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
840                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
841                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
842                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
843         </fields>
844                 <links>
845                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
846                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
847         </links>
848         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
849             <actions>
850                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
851                 <retrieve/>
852                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
853                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
854             </actions>
855         </permacrud>
856         </class>
857
858         <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">
859                 <fields oils_persist:primary="name">
860                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
861                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
862                         <field reporter:label="Description" name="description" reporter:datatype="text" />
863                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
864                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
865                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
866                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
867                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
868                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
869                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
870                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
871                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
872                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
873                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
874                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
875                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
876                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
877                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
878                 </fields>
879                 <links>
880                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
881                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
882                 </links>
883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
884             <actions>
885                 <create permission="ADMIN_SVF" global_required="true"/>
886                 <retrieve/>
887                 <update permission="ADMIN_SVF" global_required="true"/>
888                 <delete permission="ADMIN_SVF" global_required="true"/>
889             </actions>
890         </permacrud>
891         </class>
892
893         <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">
894                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
895                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
896                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
897                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
898             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
899                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
900                 </fields>
901                 <links/>
902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
903             <actions>
904                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
905                 <retrieve/>
906                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
907                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
908             </actions>
909         </permacrud>
910         </class>
911
912         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
913                 <fields oils_persist:primary="coded_value">
914                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
915                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
916                 </fields>
917                 <links>
918                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
919                 </links>
920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
921             <actions>
922                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
923                 <retrieve/>
924                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
925                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
926             </actions>
927         </permacrud>
928         </class>
929
930         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
931                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
932                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
933                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
934                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
935                 </fields>
936                 <links>
937                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
938                 </links>
939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
940             <actions>
941                 <retrieve/>
942             </actions>
943         </permacrud>
944         </class>
945
946
947         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
948                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
949                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
950                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
951                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
952                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
953                 </fields>
954                 <links>
955                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
956                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
957                 </links>
958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
959             <actions>
960                 <retrieve/>
961             </actions>
962         </permacrud>
963         </class>
964
965
966         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
967                 <fields oils_persist:primary="source">
968                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
969                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
970                 </fields>
971                 <links>
972                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
973                 </links>
974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
975             <actions>
976                 <retrieve/>
977             </actions>
978         </permacrud>
979         </class>
980
981         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
982                 <fields>
983                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
984                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
985                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
986                 </fields>
987                 <links>
988                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
989                 </links>
990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
991             <actions>
992                 <retrieve/>
993             </actions>
994         </permacrud>
995         </class>
996
997         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
998                 <fields oils_persist:primary="id">
999                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1000                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1001                 </fields>
1002                 <links>
1003                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1004                 </links>
1005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1006             <actions>
1007                 <retrieve/>
1008             </actions>
1009         </permacrud>
1010         </class>
1011
1012         <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">
1013                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1014                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1015                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1016                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1017                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1018                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1019                 </fields>
1020                 <links>
1021                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1022                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1023                 </links>
1024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1025             <actions>
1026                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1027                 <retrieve/>
1028                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1029                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1030             </actions>
1031         </permacrud>
1032         </class>
1033
1034         <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">
1035                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1036                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1037                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1038                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1039                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1040                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1041                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1042                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1043             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1044             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1045             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1046                 </fields>
1047                 <links>
1048                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1049                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1050                 </links>
1051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1052             <actions>
1053                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1054                 <retrieve/>
1055                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1056                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1057             </actions>
1058         </permacrud>
1059         </class>
1060
1061         <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">
1062                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1063                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1064                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1065                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1066                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1067                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1068                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1069                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1070                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1071                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1072                 </fields>
1073                 <links>
1074                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1075                 </links>
1076         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1077             <actions>
1078                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1079                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1080                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1081                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1082             </actions>
1083         </permacrud>
1084         </class>
1085
1086     <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">
1087         <fields oils_persist:primary="name">
1088             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1089             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1090             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1091             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1092             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1093             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1094             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1095             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1096             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1097             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1098         </fields>
1099         <links>
1100             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1101             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1102         </links>
1103         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1104             <actions>
1105                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1106                 <retrieve/>
1107                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1108                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1109             </actions>
1110         </permacrud>
1111     </class>
1112
1113     <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">
1114         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1115             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1116             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1117             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1118             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1119             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1120             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1121             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1122         </fields>
1123         <links>
1124             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1125         </links>
1126         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1127             <actions>
1128                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1129                 <retrieve/>
1130                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1131                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1132             </actions>
1133         </permacrud>
1134     </class>
1135
1136     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1137                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1138                         oils_persist:tablename="config.z3950_index_field_map" 
1139                         reporter:label="Z39.50 Index Field Map">
1140         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1141             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1142             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1143             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1144             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1145             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1146             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1147         </fields>
1148         <links>
1149             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1150             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1151             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1152         </links>
1153         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1154             <actions>
1155                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1156                 <retrieve/>
1157                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1158                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1159             </actions>
1160         </permacrud>
1161     </class>
1162
1163
1164         <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">
1165                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1166                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1167                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1168                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1169                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1170                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1171                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1172                 </fields>
1173                 <links>
1174             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1175             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1176                 </links>
1177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1178                         <actions>
1179                                 <retrieve/>
1180                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1181                         </actions>
1182                 </permacrud>
1183         </class>
1184
1185         <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">
1186                 <fields oils_persist:primary="key">
1187                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1188                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1189                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1190                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1191                 </fields>
1192                 <links/>
1193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1194                         <actions>
1195                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1196                                 <retrieve/>
1197                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1198                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1199                         </actions>
1200                 </permacrud>
1201         </class>
1202
1203         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1204                 <fields oils_persist:primary="module">
1205                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1206                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1207                 </fields>
1208                 <links/>
1209         </class>
1210
1211         <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">
1212                 <fields oils_persist:primary="module">
1213                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1214                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1215                 </fields>
1216                 <links/>
1217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1218                         <actions>
1219                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1220                                 <retrieve/>
1221                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1222                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1223                         </actions>
1224                 </permacrud>
1225         </class>
1226
1227         <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">
1228                 <fields oils_persist:primary="module">
1229                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1230                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1231                 </fields>
1232                 <links/>
1233                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1234                         <actions>
1235                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1236                                 <retrieve/>
1237                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1238                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1239                         </actions>
1240                 </permacrud>
1241         </class>
1242
1243         <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">
1244                 <fields oils_persist:primary="module">
1245                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1246                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1247                 </fields>
1248                 <links/>
1249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1250                         <actions>
1251                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1252                                 <retrieve/>
1253                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1254                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1255                         </actions>
1256                 </permacrud>
1257         </class>
1258
1259         <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">
1260                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1261                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1262                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1263                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1264                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1265                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1266                 </fields>
1267                 <links>
1268                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1269                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1270                 </links>
1271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1272                         <actions>
1273                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1274                     <context link="event_def" field="owner"/>
1275                 </create>
1276                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1277                     <context link="event_def" field="owner"/>
1278                 </retrieve>
1279                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1280                     <context link="event_def" field="owner"/>
1281                 </update>
1282                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1283                     <context link="event_def" field="owner"/>
1284                 </delete>
1285                         </actions>
1286                 </permacrud>
1287         </class>
1288
1289         <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">
1290                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1291                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1292                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1293                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1294                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1295                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1296                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1297                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1298                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1299                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1300                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1301                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1302                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1303                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1304                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1305                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1306                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1307                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1308                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1309                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1310                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1311                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1312                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1313                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1314                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1315                 </fields>
1316                 <links>
1317                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1318                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1319                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1320                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1321                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1322                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1323                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1324                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1325                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1326                 </links>
1327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1328                         <actions>
1329                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1330                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1331                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1332                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1333                         </actions>
1334                 </permacrud>
1335         </class>
1336
1337         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1338                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1339                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1340                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1341                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1342                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1343                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1344                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1345                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1346                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1347                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1348                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1349                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1350                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1351                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1352                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1353                 </fields>
1354                 <links>
1355                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1356                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1357                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1358                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1359                 </links>
1360         </class>
1361
1362         <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">
1363                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1364                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1365                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1366                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1367                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1368                 </fields>
1369                 <links>
1370                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1371                 </links>
1372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1373                         <actions>
1374                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1375                     <context link="event_def" field="owner"/>
1376                 </create>
1377                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1378                     <context link="event_def" field="owner"/>
1379                 </retrieve>
1380                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1381                     <context link="event_def" field="owner"/>
1382                 </update>
1383                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1384                     <context link="event_def" field="owner"/>
1385                 </delete>
1386                         </actions>
1387                 </permacrud>
1388         </class>
1389
1390         <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">
1391                 <oils_persist:source_definition><![CDATA[
1392                 SELECT  atevdef.hook,
1393                         atevdef.name,
1394                         atevdef.reactor,
1395                         atev.id,
1396                         atev.event_def,
1397                         atev.add_time,
1398                         atev.run_time,
1399                         atev.start_time,
1400                         atev.update_time,
1401                         atev.complete_time,
1402                         atev.update_process,
1403                         atev.state,
1404                         atev.user_data,
1405                         atev.template_output,
1406                         atev.error_output,
1407                         atev.async_output,
1408                         targ_circ.id AS target_circ,
1409                         targ_ahr.id AS target_hold,
1410                         COALESCE(
1411                                 targ_circ.circ_lib,
1412                                 targ_ahr.pickup_lib
1413                         ) AS perm_lib
1414                 FROM action_trigger.event atev
1415                 JOIN action_trigger.event_definition atevdef ON
1416                         (atevdef.id = atev.event_def)
1417                 JOIN action_trigger.hook ath ON
1418                         (ath.key = atevdef.hook)
1419                 LEFT JOIN action.circulation targ_circ ON
1420                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1421                 LEFT JOIN action.hold_request targ_ahr ON
1422                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1423                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1424                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1425                                 'circ.staff.max_visible_event_age',
1426                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1427                         ) UNION
1428                         SELECT '1000 YEARS'::INTERVAL AS value
1429                 ) ous)
1430                 ]]></oils_persist:source_definition>
1431                 <fields oils_persist:primary="id">
1432                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1433                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1434                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1435                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1436                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1437                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1438                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1439                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1440                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1441                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1442                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1443                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1444                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1445                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1446                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1447                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1448                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1449                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1450                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1451                 </fields>
1452                 <links>
1453                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1454                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1455                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1456                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1457                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1458                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1459                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1460                 </links>
1461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1462                         <actions>
1463                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1464                         </actions>
1465                 </permacrud>
1466         </class>
1467
1468         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1469                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1470                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1471                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1472                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1473                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1474                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1475                 </fields>
1476                 <links>
1477                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1478                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1479                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1480                 </links>
1481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1482                         <actions>
1483                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1484                         </actions>
1485                 </permacrud>
1486         </class>
1487
1488         <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">
1489                 <fields oils_persist:primary="code">
1490                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1491                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1492                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1493                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1494                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1495                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1496                 </fields>
1497                 <links/>
1498         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1499             <actions>
1500                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1501                 <retrieve/>
1502                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1503                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1504             </actions>
1505         </permacrud>
1506         </class>
1507
1508         <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">
1509                 <fields oils_persist:primary="code">
1510                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1511                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1512                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1513                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1514                 </fields>
1515                 <links/>
1516         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1517             <actions>
1518                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1519                 <retrieve/>
1520                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1521                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1522             </actions>
1523         </permacrud>
1524         </class>
1525
1526         <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">
1527                 <fields oils_persist:primary="code">
1528                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1529                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1530                 </fields>
1531                 <links/>
1532         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1533             <actions>
1534                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1535                 <retrieve/>
1536                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1537                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1538             </actions>
1539         </permacrud>
1540         </class>
1541
1542         <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">
1543                 <fields oils_persist:primary="code">
1544                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1545                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1546                 </fields>
1547                 <links/>
1548         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1549             <actions>
1550                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1551                 <retrieve/>
1552                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1553                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1554             </actions>
1555         </permacrud>
1556         </class>
1557
1558         <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">
1559                 <fields oils_persist:primary="code">
1560                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1561                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1562                 </fields>
1563                 <links/>
1564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1565             <actions>
1566                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1567                 <retrieve/>
1568                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1569                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1570             </actions>
1571         </permacrud>
1572         </class>
1573
1574         <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">
1575                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1576                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1577                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1578                 </fields>
1579                 <links/>
1580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1581             <actions>
1582                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1583                 <retrieve/>
1584                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1585                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1586             </actions>
1587         </permacrud>
1588         </class>
1589
1590         <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">
1591                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1592                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1593                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1594                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1595                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1596                 </fields>
1597         <links>
1598             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1599             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1600             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1601         </links>
1602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1603             <actions>
1604                 <create permission="UPDATE_COPY">
1605                     <context link="target_copy" field="circ_lib"/>
1606                 </create>
1607                 <retrieve/>
1608                 <update permission="UPDATE_COPY">
1609                     <context link="target_copy" field="circ_lib"/>
1610                 </update>
1611                 <delete permission="UPDATE_COPY">
1612                     <context link="target_copy" field="circ_lib"/>
1613                 </delete>
1614             </actions>
1615         </permacrud>
1616         </class>
1617
1618         <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">
1619                 <fields oils_persist:primary="code">
1620                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1621                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1622                 </fields>
1623                 <links/>
1624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1625             <actions>
1626                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1627                 <retrieve/>
1628                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1629                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1630             </actions>
1631         </permacrud>
1632         </class>
1633
1634         <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">
1635                 <fields oils_persist:primary="code">
1636                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1637                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1638                 </fields>
1639                 <links/>
1640         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1641             <actions>
1642                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1643                 <retrieve/>
1644                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1645                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1646             </actions>
1647         </permacrud>
1648         </class>
1649
1650         <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">
1651                 <fields oils_persist:primary="code">
1652                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1653                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1654                 </fields>
1655                 <links/>
1656         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1657             <actions>
1658                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1659                 <retrieve/>
1660                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1661                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1662             </actions>
1663         </permacrud>
1664         </class>
1665
1666     <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">
1667         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1668             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1669             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1670             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1671             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1672             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1673             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1674             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1675             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1676             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1677             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1678             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1679             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1680             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1681             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1682             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1683             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1684             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1685         </fields>
1686         <links/>
1687         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1688             <actions>
1689                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1690                 <retrieve/>
1691                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1692                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1693             </actions>
1694         </permacrud>
1695     </class>
1696
1697     <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">
1698         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1699             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1700             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1701             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1702             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1703             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1704             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1705             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1706             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1707             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1708             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1709             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1710             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1711             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1712             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1713             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1714             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1715             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1716             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1717             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1718         </fields>
1719         <links/>
1720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1721             <actions>
1722                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1723                 <retrieve/>
1724                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1725                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1726             </actions>
1727         </permacrud>
1728     </class>
1729
1730     <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">
1731         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1732             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1733             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1734             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1735             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1736             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1737         </fields>
1738         <links>
1739             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1740             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1741             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1742         </links>
1743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1744             <actions>
1745                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1746                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1747                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1748                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1749             </actions>
1750         </permacrud>
1751     </class>
1752
1753         <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">
1754                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1755                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1756                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1757                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1758                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1759                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1760                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1761                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1762                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1763                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1764                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1765                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1766                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1767                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1768                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1769                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1770                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1771             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1772                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1773                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1774                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1775                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1776                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1777                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1778                 </fields>
1779                 <links>
1780                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1781                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1782                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1783                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1784                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1785                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1786                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1787                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1788                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1789                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1790                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1791                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1792                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1793             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1794                 </links>
1795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1796             <actions>
1797                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1798                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1799                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1800                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1801             </actions>
1802         </permacrud>
1803         </class>
1804
1805         <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">
1806                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1807                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1808                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1809                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1810                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1811                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1812                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1813                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1814                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1815                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1816                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1817                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1818                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1819                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1820                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1821                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1822             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1823                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1824                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1825             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1826                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1827                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1828                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1829                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1830             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1831             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1832             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1833                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1834                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1835                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1836                 </fields>
1837                 <links>
1838                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1839                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1840                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1841                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1842                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1843                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1844                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1845                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1846                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1847                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1848                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1849                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1850                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1851                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1852             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1853                 </links>
1854         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1855             <actions>
1856                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1857                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1858                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1859                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1860             </actions>
1861         </permacrud>
1862         </class>
1863
1864     <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">
1865         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1866             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1867             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1868             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1869         </fields>
1870         <links/>
1871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1872             <actions>
1873                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1874                 <retrieve/>
1875                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1876                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1877             </actions>
1878         </permacrud>
1879     </class>
1880
1881     <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">
1882         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1883             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1884             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1885             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1886             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1887             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1888             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1889             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1890         </fields>
1891         <links>
1892             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1893         </links>
1894         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1895             <actions>
1896                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1897                 <retrieve/>
1898                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1899                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1900             </actions>
1901         </permacrud>
1902     </class>
1903
1904     <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">
1905         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1906             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1907             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1908             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1909             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1910             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1911         </fields>
1912         <links>
1913             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1914             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1915         </links>
1916         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1917             <actions>
1918                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1919                     <context link="matchpoint" field="org_unit"/>
1920                 </create>
1921                 <retrieve/>
1922                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1923                     <context link="matchpoint" field="org_unit"/>
1924                 </update>
1925                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1926                     <context link="matchpoint" field="org_unit"/>
1927                 </delete>
1928             </actions>
1929         </permacrud>
1930     </class>
1931
1932     <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">
1933         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1934             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1935             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1936             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1937         </fields>
1938         <links>
1939             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1940             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1941         </links>
1942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1943             <actions>
1944                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1945                     <context link="limit_set" field="owning_lib"/>
1946                 </create>
1947                 <retrieve/>
1948                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1949                     <context link="limit_set" field="owning_lib"/>
1950                 </update>
1951                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1952                     <context link="limit_set" field="owning_lib"/>
1953                 </delete>
1954             </actions>
1955         </permacrud>
1956     </class>
1957     <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">
1958         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1959             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1960             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1961             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1962         </fields>
1963         <links>
1964             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1965             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1966         </links>
1967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1968             <actions>
1969                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1970                     <context link="limit_set" field="owning_lib"/>
1971                 </create>
1972                 <retrieve/>
1973                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1974                     <context link="limit_set" field="owning_lib"/>
1975                 </update>
1976                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1977                     <context link="limit_set" field="owning_lib"/>
1978                 </delete>
1979             </actions>
1980         </permacrud>
1981     </class>
1982
1983     <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">
1984         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1985             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1986             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1987             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1988             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1989         </fields>
1990         <links>
1991             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1992             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1993         </links>
1994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1995             <actions>
1996                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1997                     <context link="limit_set" field="owning_lib"/>
1998                 </create>
1999                 <retrieve/>
2000                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2001                     <context link="limit_set" field="owning_lib"/>
2002                 </update>
2003                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2004                     <context link="limit_set" field="owning_lib"/>
2005                 </delete>
2006             </actions>
2007         </permacrud>
2008     </class>
2009
2010         <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">
2011                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2012                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2013                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2014                 </fields>
2015                 <links/>
2016         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2017             <actions>
2018                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2019                 <retrieve/>
2020                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2021                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2022             </actions>
2023         </permacrud>
2024         </class>
2025
2026         <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">
2027                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2028                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2029                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2030                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2031                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2032                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2033                 </fields>
2034                 <links>
2035                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2036                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2037                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2038                 </links>
2039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2040             <actions>
2041                 <create permission="ADMIN_SURVEY">
2042                     <context link="survey" field="owner"/>
2043                 </create>
2044                 <retrieve/>
2045                 <update permission="ADMIN_SURVEY">
2046                     <context link="survey" field="owner"/>
2047                 </update>
2048                 <delete permission="ADMIN_SURVEY">
2049                     <context link="survey" field="owner"/>
2050                 </delete>
2051             </actions>
2052         </permacrud>
2053         </class>
2054         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2055                 <fields oils_persist:primary="id" oils_persist:sequence="">
2056                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2057                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2058                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2059                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2060                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2061                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2062                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2063                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2064                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2065                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2066                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2067                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2068                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2069                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2070                 </fields>
2071                 <links>
2072                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2073                 </links>
2074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2075                         <actions>
2076                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2077                                         <context link="usr" field="home_ou" />
2078                                 </retrieve>
2079                         </actions>
2080                 </permacrud>
2081         </class>
2082         <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">
2083                 <fields oils_persist:primary="id" oils_persist:sequence="">
2084                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2085                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2086                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2087                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2088                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2089                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2090                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2091                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2092                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2093                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2094                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2095                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2096                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2097                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2098                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2099                 </fields>
2100                 <links>
2101                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2102                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2103                 </links>
2104         </class>
2105         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2106                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2107                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2108                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2109                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2110                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2111                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2112                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2113                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2114                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2115                 </fields>
2116                 <links>
2117                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2118                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2119                 </links>
2120                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2121                         <actions> <!-- created magically, so no create action -->
2122                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2123                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2124                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2125                         </actions>
2126                 </permacrud>
2127         </class>
2128         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2129                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2130                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2131                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2132                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2133                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2134                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2135                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2136                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2137                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2138                 </fields>
2139                 <links>
2140                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2141                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2142                 </links>
2143                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2144                         <actions> <!-- created magically, so no create action -->
2145                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2146                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2147                         </actions>
2148                 </permacrud>
2149         </class>
2150         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2151                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2152                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2153                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2154                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2155                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2156                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2157                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2158                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2159                 </fields>
2160                 <links>
2161                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2162                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2163                 </links>
2164         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2165             <actions>
2166                 <create permission="UPDATE_USER" context_field="owner">
2167                     <context link="usr" field="home_ou"/>
2168                 </create>
2169                                 <!-- note: public notes are still accessible via API -->
2170                 <retrieve permission="UPDATE_USER">
2171                     <context link="usr" field="home_ou"/>
2172                                 </retrieve>
2173                 <update permission="UPDATE_USER">
2174                     <context link="usr" field="home_ou"/>
2175                                 </update>
2176                 <delete permission="UPDATE_USER">
2177                     <context link="usr" field="home_ou"/>
2178                                 </delete>
2179             </actions>
2180         </permacrud>
2181         </class>
2182         <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">
2183                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2184                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2185                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2186                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2187                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2188                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2189                 </fields>
2190                 <links>
2191                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2192                 </links>
2193         </class>
2194         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2195                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2196                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2197                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2198                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2199                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2200                 </fields>
2201                 <links>
2202                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2203                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2204                 </links>
2205         </class>
2206         <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">
2207                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2208                         <field name="field" reporter:datatype="link"/>
2209                         <field name="id" reporter:datatype="id" />
2210                         <field name="source" reporter:datatype="link"/>
2211                         <field name="value" reporter:datatype="text"/>
2212                 </fields>
2213                 <links>
2214                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2215                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2216                 </links>
2217         </class>
2218         <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">
2219                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2220                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2221                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2222                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2223                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2224                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2225                 </fields>
2226                 <links>
2227                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2228                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2229                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2230                 </links>
2231         </class>
2232         <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">
2233                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2234                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2235                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2236                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2237                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2238                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2239                 </fields>
2240                 <links>
2241                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2242                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2243                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2244                 </links>
2245         </class>
2246         <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">
2247                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2248                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2249                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2250                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2251                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2252                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2253                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2254                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2255                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2256                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2257                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2258                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2259                 </fields>
2260                 <links>
2261                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2262                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2263                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2264                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2265                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2266                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2267                 </links>
2268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2269             <actions>
2270                 <create permission="TRANSIT_COPY" context_field="owner">
2271                     <context link="target_copy" field="circ_lib"/>
2272                 </create>
2273                 <retrieve/>
2274                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2275                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2276             </actions>
2277         </permacrud>
2278         </class>
2279         <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">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2281                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2282                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2283                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2284                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2285                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2286                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2287                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2288                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2289                 </fields>
2290                 <links>
2291                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2292                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2293                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2294                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2295                 </links>
2296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2297             <actions>
2298                 <create permission="ADMIN_SURVEY">
2299                     <context link="survey" field="owner"/>
2300                 </create>
2301                 <retrieve/>
2302                 <update permission="ADMIN_SURVEY">
2303                     <context link="survey" field="owner"/>
2304                 </update>
2305                 <delete permission="ADMIN_SURVEY">
2306                     <context link="survey" field="owner"/>
2307                 </delete>
2308             </actions>
2309         </permacrud>
2310         </class>
2311         <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">
2312                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2313                         <field name="bucket" />
2314                         <field name="id" reporter:datatype="id" />
2315                         <field name="target_copy" reporter:datatype="link"/>
2316                         <field name="create_time" reporter:datatype="timestamp" />
2317                         <field name="pos" reporter:datatype="int" />
2318                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2319                 </fields>
2320                 <links>
2321                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2322                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2323             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2324                 </links>
2325         </class>
2326         <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">
2327                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2328                         <field name="id" reporter:datatype="id" />
2329                         <field name="item" reporter:datatype="link"/>
2330                         <field name="note" reporter:datatype="text" />
2331                 </fields>
2332                 <links>
2333                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2334                 </links>
2335         </class>
2336
2337         <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">
2338                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2339                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2340                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2341                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2342                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2343                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2344                 </fields>
2345                 <links>
2346                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2347                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2348                 </links>
2349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2350                         <actions>
2351                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2352                                 <retrieve/>
2353                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2354                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2355                         </actions>
2356                 </permacrud>
2357         </class>
2358
2359         <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">
2360                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2361                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2362                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2363                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2364                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2365                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2366                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2367                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2368                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2369                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2370                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2371                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2372                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2373                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2374                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2375                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2376                 </fields>
2377                 <links>
2378                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2379                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2380                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2381                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2382                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2383                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2384                 </links>
2385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2386                         <actions>
2387                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2388                                 <retrieve/>
2389                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2390                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2391                         </actions>
2392                 </permacrud>
2393         </class>
2394
2395         <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">
2396                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2397                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2398                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2399                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2400                 </fields>
2401                 <links>
2402                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2403                 </links>
2404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405                         <actions>
2406                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2407                                 <retrieve/>
2408                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2409                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2410                         </actions>
2411                 </permacrud>
2412         </class>
2413
2414         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2415                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2416                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2417                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2418                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2419                 </fields>
2420                 <links>
2421                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2422                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2423                 </links>
2424                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2425                         <actions>
2426                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2427                                 <retrieve/>
2428                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2429                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2430                         </actions>
2431                 </permacrud>
2432         </class>
2433
2434         <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">
2435                 <fields oils_persist:primary="code">
2436                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2437                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2438                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2439                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2440                 </fields>
2441                 <links>
2442                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2443                 </links>
2444                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2445                         <actions>
2446                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2447                                 <retrieve/>
2448                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2449                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2450                         </actions>
2451                 </permacrud>
2452         </class>
2453
2454         <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">
2455                 <fields oils_persist:primary="code">
2456                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2457                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2458                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2459                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2460                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2461                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2462                 </fields>
2463                 <links>
2464                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2465                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2466                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2467                 </links>
2468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2469                         <actions>
2470                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2471                                 <retrieve/>
2472                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2473                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2474                         </actions>
2475                 </permacrud>
2476         </class>
2477
2478     <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">
2479         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2480             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2481             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2482             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2483         </fields>
2484         <links>
2485             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2486             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2487         </links>
2488         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2489             <actions>
2490                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2491                 <retrieve/>
2492                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2493                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2494             </actions>
2495         </permacrud>
2496     </class>
2497
2498         <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">
2499                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2500                         <field name="active" reporter:datatype="bool"/>
2501                         <field name="create_date" reporter:datatype="timestamp"/>
2502                         <field name="creator" />
2503                         <field name="deleted" reporter:datatype="bool"/>
2504                         <field name="edit_date" reporter:datatype="timestamp"/>
2505                         <field name="editor" />
2506                         <field name="id" reporter:datatype="id" />
2507                         <field name="last_xact_id" />
2508                         <field name="marc" />
2509                         <field name="source" />
2510                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2511                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2512                         <field name="heading" />
2513                         <field name="simple_heading" />
2514                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2515                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2516                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2517                 </fields>
2518                 <links>
2519                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2520                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2521                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2522                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2523                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2524                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2525                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2526                 </links>
2527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2528                         <actions>
2529                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2530                                 <retrieve/>
2531                                 <update permission="UPDATE_MARC" global_required="true"/>
2532                                 <delete permission="UPDATE_MARC" global_required="true"/>
2533                         </actions>
2534                 </permacrud>
2535         </class>
2536         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2537                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2538                         <field name="char_encoding" />
2539                         <field name="id" />
2540                         <field name="record" />
2541                         <field name="record_status" />
2542                         <field name="thesaurus" />
2543                 </fields>
2544                 <links>
2545                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2546                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2547                 </links>
2548         </class>
2549         <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">
2550                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2551                         <field name="id" reporter:datatype="id" />
2552                         <field name="bib" reporter:datatype="link" />
2553                         <field name="authority" reporter:datatype="link" />
2554                 </fields>
2555                 <links>
2556                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2557                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2558                 </links>
2559         </class>
2560         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2561                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2562                         <field name="id" reporter:datatype="id" />
2563                         <field name="record" reporter:datatype="link" />
2564                         <field name="atag" reporter:datatype="link" />
2565                         <field name="value" reporter:datatype="text" />
2566                 </fields>
2567                 <links>
2568                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2569                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2570                 </links>
2571         </class>
2572         <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">
2573                 <fields oils_persist:primary="code" oils_persist:sequence="">
2574                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2575                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2576                 </fields>
2577                 <links/>
2578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2579             <actions>
2580                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2581                 <retrieve/>
2582                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2583                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2584             </actions>
2585         </permacrud>
2586         </class>
2587         <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2588                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2589                         <field name="accepting_usr" />
2590                         <field name="amount" reporter:datatype="money" />
2591                         <field name="amount_collected" reporter:datatype="money" />
2592                         <field name="approval_code" reporter:datatype="text"/>
2593                         <field name="cash_drawer" reporter:datatype="link"/>
2594                         <field name="cc_first_name" reporter:datatype="text"/>
2595                         <field name="cc_last_name" reporter:datatype="text"/>
2596                         <field name="cc_number" reporter:datatype="text"/>
2597                         <field name="cc_order_number" reporter:datatype="text"/>
2598                         <field name="cc_type" reporter:datatype="text"/>
2599                         <field name="cc_processor" reporter:datatype="text"/>
2600                         <field name="expire_month" reporter:datatype="int" />
2601                         <field name="expire_year" reporter:datatype="int" />
2602                         <field name="id" reporter:datatype="id" />
2603                         <field name="note" reporter:datatype="text"/>
2604                         <field name="payment_ts" reporter:datatype="timestamp"/>
2605                         <field name="xact" reporter:datatype="link"/>
2606                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2607                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2608                 </fields>
2609                 <links>
2610                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2611                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2612                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2613                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2614                 </links>
2615         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2616             <actions>
2617                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2618                     <context link="xact" jump="usr" field="home_ou"/>
2619                 </retrieve>
2620                         </actions>
2621                 </permacrud>
2622         </class>
2623         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">
2624                 <fields oils_persist:primary="name">
2625                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2626                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2627                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2628                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2629                 </fields>
2630                 <links/>
2631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2632             <actions>
2633                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2634                 <retrieve/>
2635                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2636                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2637             </actions>
2638         </permacrud>
2639         </class>
2640
2641         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2642                 <fields oils_persist:primary="alias">
2643                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2644                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2645                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2646                 </fields>
2647                 <links>
2648                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2649                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2650                 </links>
2651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2652             <actions>
2653                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2654                 <retrieve/>
2655                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2656                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2657             </actions>
2658         </permacrud>
2659         </class>
2660
2661         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2662                 <fields oils_persist:primary="name">
2663                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2664                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2665                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2666                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2667                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2668                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2669                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2670                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2671                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2672                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2673                 </fields>
2674                 <links>
2675                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2676                 </links>
2677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2678             <actions>
2679                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2680                 <retrieve/>
2681                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2682                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2683             </actions>
2684         </permacrud>
2685         </class>
2686
2687         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
2688                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2689                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2690                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2691                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2692                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2693                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2694                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2695                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2696                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2697                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2698                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2699                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2700                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2701                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2702                 </fields>
2703                 <links>
2704                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2705                 </links>
2706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2707             <actions>
2708                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2709                 <retrieve/>
2710                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2711                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2712             </actions>
2713         </permacrud>
2714         </class>
2715         <class id="cbho" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::best_hold_order" oils_persist:tablename="config.best_hold_order" reporter:label="Best-Hold Sort Order">
2716                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2717                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2718                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2719                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2720                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2721                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2722                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2723                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2724                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2725                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2726                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2727                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2728                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2729                 </fields>
2730                 <links>
2731                 </links>
2732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2733                         <actions>
2734                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2735                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2736                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2737                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2738                         </actions>
2739                 </permacrud>
2740         </class>
2741         <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
2742                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2743                         <field name="id" reporter:datatype="id" />
2744                         <field name="name" reporter:datatype="text"/>
2745                         <field name="xpath" reporter:datatype="text"/>
2746                         <field name="format" reporter:datatype="link"/>
2747                         <field name="first_word" reporter:datatype="bool" />
2748                 </fields>
2749                 <links/>
2750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2751             <actions>
2752                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2753                 <retrieve/>
2754                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2755                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2756             </actions>
2757         </permacrud>
2758         </class>
2759         <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">
2760                 <fields oils_persist:primary="code" oils_persist:sequence="">
2761                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2762                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2763                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2764                 </fields>
2765                 <links/>
2766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2767             <actions>
2768                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2769                 <retrieve/>
2770                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2771                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2772             </actions>
2773         </permacrud>
2774         </class>
2775         <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">
2776                 <fields oils_persist:primary="code" oils_persist:sequence="">
2777                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2778                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2779                 </fields>
2780                 <links/>
2781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2782             <actions>
2783                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2784                 <retrieve/>
2785                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2786                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2787             </actions>
2788         </permacrud>
2789         </class>
2790     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
2791         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2792             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2793             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2794             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2795             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2796         </fields>
2797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2798             <actions>
2799                 <retrieve/>
2800             </actions>
2801         </permacrud>
2802     </class>
2803         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
2804                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2805                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2806                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2807                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2808                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2809                 </fields>
2810                 <links>
2811                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2812                 </links>
2813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2814             <actions>
2815                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2816                 <retrieve/>
2817                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2818                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2819             </actions>
2820         </permacrud>
2821         </class>
2822         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
2823                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2824                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2825                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2826                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2827                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2828                 </fields>
2829                 <links>
2830                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2831                 </links>
2832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2833             <actions>
2834                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2835                 <retrieve/>
2836                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2837                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2838             </actions>
2839         </permacrud>
2840         </class>
2841         <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">
2842                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2843                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2844                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2845                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2846                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2847                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2848                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2849                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2850                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2851                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2852                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2853                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2854                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2855                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2856                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2857                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2858                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2859                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2860                 </fields>
2861                 <links>
2862                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2863                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2864                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2865                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2866                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2867                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2868                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2869                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2870                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2871                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2872                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2873                 </links>
2874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2875             <actions>
2876                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2877                 <retrieve/>
2878                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2879                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2880             </actions>
2881         </permacrud>
2882         </class>
2883         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2885                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2886                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2887                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2888                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2889                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2890                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2891                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2892                 </fields>
2893                 <links>
2894                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2895                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2896         </links>
2897         </class>
2898         <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">
2899                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2900                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2901                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2902                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2903                 </fields>
2904                 <links>
2905                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2906                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2907                 </links>
2908         </class>
2909         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2910                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2911                         <field name="id" reporter:datatype="id" />
2912                         <field name="value" oils_persist:i18n="true" />
2913                 </fields>
2914                 <links/>
2915         </class>
2916         <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
2917                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2918                         <field name="balance_owed" reporter:datatype="money" />
2919                         <field name="total_owed" reporter:datatype="money" />
2920                         <field name="total_paid" reporter:datatype="money" />
2921                         <field name="usr" reporter:datatype="link"/>
2922                 </fields>
2923                 <links>
2924                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2925         </links>
2926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2927             <actions>
2928                 <retrieve permission="VIEW_USER">
2929                     <context link="usr" field="home_ou"/>
2930                 </retrieve>
2931             </actions>
2932         </permacrud>
2933         </class>
2934         <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">
2935                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2936                         <field name="collector" />
2937                         <field name="enter_time" reporter:datatype="timestamp"/>
2938                         <field name="id" reporter:datatype="id" />
2939                         <field name="location" reporter:datatype="link"/>
2940                         <field name="usr" reporter:datatype="link"/>
2941                 </fields>
2942                 <links>
2943                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2944                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2945                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2946                 </links>
2947         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2948             <actions>
2949                 <create permission="money.collections_tracker.create" context_field="location"/>
2950                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2951                 <delete permission="money.collections_tracker.create" context_field="location"/>
2952             </actions>
2953         </permacrud>
2954         </class>
2955         <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">
2956                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2957                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2958                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2959                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2960                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2961                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2962                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2963                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2964                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2965                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2966                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2967                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2968                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2969                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2970                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2971                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2972                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2973                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2974                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2975                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2976                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2978                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2979                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2980                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2981                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2982                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2983                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2984                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2985                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2986                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2987                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2988                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2989                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
2990                 </fields>
2991                 <links>
2992                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2993                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2994                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2995                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2996                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2997                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2998                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2999                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3000                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3001                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3002                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3003                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3004                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3005                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3006                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3007                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3008                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3009                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3010                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3011                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3012                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3013                 </links>
3014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3015             <actions>
3016                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3017                 <retrieve/>
3018                 <update permission="UPDATE_MARC" global_required="true"/>
3019                 <!-- WARNING: Deleting records via PCRUD does NOT check that any prerequisite conditions have been handled first. It is your responsibility to check for those conditions before deleting bib records. -->
3020                 <delete permission="DELETE_RECORD" global_required="true"/>
3021             </actions>
3022         </permacrud>
3023         </class>
3024         <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">
3025                 <fields oils_persist:primary="id">
3026                         <field name="dow_0_close" />
3027                         <field name="dow_0_open" />
3028                         <field name="dow_1_close" />
3029                         <field name="dow_1_open" />
3030                         <field name="dow_2_close" />
3031                         <field name="dow_2_open" />
3032                         <field name="dow_3_close" />
3033                         <field name="dow_3_open" />
3034                         <field name="dow_4_close" />
3035                         <field name="dow_4_open" />
3036                         <field name="dow_5_close" />
3037                         <field name="dow_5_open" />
3038                         <field name="dow_6_close" />
3039                         <field name="dow_6_open" />
3040                         <field name="id" reporter:datatype="id" />
3041                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3042                 </fields>
3043                 <links>
3044                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3045                 </links>
3046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3047             <actions>
3048                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3049                 <retrieve/>
3050                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3051                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3052             </actions>
3053         </permacrud>
3054         </class>
3055         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
3056                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3057                         <field name="id" reporter:datatype="id" />
3058                         <field name="record" reporter:datatype="link"/>
3059                         <field name="label" reporter:datatype="text"/>
3060                         <field name="label_sortkey" reporter:datatype="text"/>
3061                         <field name="deleted" reporter:datatype="bool"/>
3062                 </fields>
3063                 <links>
3064                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3065                 </links>
3066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3067             <actions>
3068                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3069                 <retrieve/>
3070                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3071                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3072             </actions>
3073         </permacrud>
3074         </class>
3075         <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
3076                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3077                         <field name="id" reporter:datatype="id" />
3078                         <field name="target_copy" reporter:datatype="link" />
3079                         <field name="part" reporter:datatype="link"/>
3080                 </fields>
3081                 <links>
3082                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3083                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3084                 </links>
3085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3086             <actions>
3087                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3088                 <retrieve/>
3089                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3090                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3091             </actions>
3092         </permacrud>
3093         </class>
3094         <class id="aoucd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::closed_date" oils_persist:tablename="actor.org_unit_closed" reporter:label="Closed Dates">
3095                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3096                         <field name="close_end" reporter:datatype="timestamp" />
3097                         <field name="close_start" reporter:datatype="timestamp" />
3098                         <field name="id" reporter:datatype="id" />
3099                         <field name="org_unit" reporter:datatype="org_unit"/>
3100                         <field name="reason" reporter:datatype="text"/>
3101                 </fields>
3102                 <links>
3103                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3104                 </links>
3105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3106             <actions>
3107                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3108                 <retrieve/>
3109                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3110                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3111             </actions>
3112         </permacrud>
3113         </class>
3114         <class id="crcd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::circ_duration" oils_persist:tablename="config.rule_circ_duration" reporter:label="Circulation Duration Rule">
3115                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3116                         <field name="extended" reporter:datatype="interval"/>
3117                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3118                         <field name="max_renewals" reporter:datatype="int" />
3119                         <field name="name" reporter:datatype="text"/>
3120                         <field name="normal" reporter:datatype="interval"/>
3121                         <field name="shrt" reporter:datatype="interval"/>
3122                 </fields>
3123                 <links>
3124                 </links>
3125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3126             <actions>
3127                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3128                 <retrieve/>
3129                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3130                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3131             </actions>
3132         </permacrud>
3133         </class>
3134
3135         <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">
3136                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3137                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3138                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3139             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3140                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3141             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3142                 </fields>
3143                 <links>
3144             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3145                 </links>
3146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3147             <actions>
3148                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3149                 <retrieve/>
3150                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3151                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3152             </actions>
3153                 </permacrud>
3154         </class>
3155
3156         <class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">
3157                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3158                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3159                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3160                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3161             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3162                 </fields>
3163                 <links>
3164                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3165                 </links>
3166                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3167             <actions>
3168                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3169                 <retrieve/>
3170                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3171                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3172             </actions>
3173                 </permacrud>
3174         </class>
3175
3176         <class id="mobts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
3177                 <fields oils_persist:primary="id" oils_persist:sequence="">
3178                         <field name="balance_owed" reporter:datatype="money"/>
3179                         <field name="id" reporter:datatype="id" />
3180                         <field name="last_billing_note" reporter:datatype="text"/>
3181                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3182                         <field name="last_billing_type" reporter:datatype="text"/>
3183                         <field name="last_payment_note" reporter:datatype="text"/>
3184                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3185                         <field name="last_payment_type" reporter:datatype="text"/>
3186                         <field name="total_owed" reporter:datatype="money"/>
3187                         <field name="total_paid" reporter:datatype="money"/>
3188                         <field name="usr" reporter:datatype="link"/>
3189                         <field name="xact_finish" reporter:datatype="timestamp" />
3190                         <field name="xact_start" reporter:datatype="timestamp" />
3191                         <field name="xact_type" reporter:datatype="text"/>
3192                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3193                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3194                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3195                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3196                         <field name="billing_location" reporter:datatype="link"/>
3197                 </fields>
3198                 <links>
3199                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3200                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3201                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3202                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3203                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3204                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3205                 </links>
3206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3207                         <actions>
3208                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3209                                         <context link="usr" field="home_ou" />
3210                                 </retrieve>
3211                         </actions>
3212                 </permacrud>
3213         </class>
3214         <class id="au" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
3215                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3216                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3218                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3219                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3220                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3221                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3222                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3223                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3224                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3225                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3226                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3227                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3228                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3229                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3230                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3231                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3232                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3233                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3234                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3235                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3236                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3237                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3238                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3239                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3240                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3241                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3242                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3243                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3244                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3245                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3246                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3247                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3248                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3249                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3250                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3251                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3252                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3253                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3254                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3255                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3256                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3257                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3258                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3259                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3260                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3261                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3262                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3263                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3264                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3265                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3266                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3267                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3268                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3269                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3270                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3271                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3272                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3273                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3274                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3275                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3276                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3277                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3278                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3279                 </fields>
3280                 <links>
3281                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3282                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3283                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3284                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3285                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3286                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3287                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3288                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3289                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3290                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3291                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3292                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3293                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3294                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3295                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3296                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3297                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3298                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3299                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3300                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3301                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3302                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3303                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3304                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3305                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3306                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3307                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3308                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3309                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3310                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3311                 </links>
3312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3313                         <actions>
3314                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3315                         </actions>
3316                 </permacrud>
3317         </class>
3318         <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
3319                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3320                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3321                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3322                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3323                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3324                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3325                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3326                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3327                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3328         </fields>
3329                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3330                         <actions>
3331                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3332                                 <retrieve/>
3333                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3334                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3335                         </actions>
3336                 </permacrud>
3337         </class>
3338         <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
3339                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3340                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3341                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3342                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3343                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3344         </fields>
3345         <links>
3346                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3347                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3348                 </links>
3349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3350                         <actions>
3351                                 <retrieve permission="RUN_REPORTS">
3352                                         <context link="usr" field="home_ou" />
3353                                 </retrieve>
3354                         </actions>
3355                 </permacrud>
3356         </class>
3357         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3358                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3359                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3360                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3361                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3362                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3363                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3364                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3365         </fields>
3366         <links>
3367                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3368                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3369                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3370                 </links>
3371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3372                         <actions>
3373                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3374                                         <context link="usr" field="home_ou" />
3375                                         <context link="ws" field="owning_lib" />
3376                                 </retrieve>
3377                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3378                                         <context link="usr" field="home_ou" />
3379                                         <context link="ws" field="owning_lib" />
3380                                 </create>
3381                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3382                                         <context link="usr" field="home_ou" />
3383                                         <context link="ws" field="owning_lib" />
3384                                 </update>
3385                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3386                                         <context link="usr" field="home_ou" />
3387                                         <context link="ws" field="owning_lib" />
3388                                 </delete>
3389                         </actions>
3390                 </permacrud>
3391         </class>
3392         <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">
3393                 <fields oils_persist:primary="name">
3394                         <field name="name" reporter:datatype="text"/>
3395                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3396                 </fields>
3397                 <links/>
3398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3399                         <actions>
3400                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3401                                 <retrieve/>
3402                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3403                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3404                         </actions>
3405                 </permacrud>
3406         </class>
3407         <class id="cust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_setting_type" oils_persist:tablename="config.usr_setting_type" reporter:label="User Setting Type">
3408                 <fields oils_persist:primary="name">
3409                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3410                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3411                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3412                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3413                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3414                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3415                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3416                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3417                 </fields>
3418                 <links>
3419                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3420                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3421                 </links>
3422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3423                         <actions>
3424                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3425                                 <retrieve/>
3426                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3427                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3428                         </actions>
3429                 </permacrud>
3430         </class>
3431         <class id="coust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type" oils_persist:tablename="config.org_unit_setting_type" reporter:label="Organizational Unit Setting Type">
3432                 <fields oils_persist:primary="name">
3433                         <field name="name" reporter:datatype="text"/>
3434                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3435                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3436                         <field name="datatype" reporter:datatype="text"/>
3437                         <field name="view_perm" reporter:datatype="link"/>
3438                         <field name="update_perm" reporter:datatype="link"/>
3439                         <field name="fm_class" reporter:datatype="text"/>
3440                         <field name="grp" reporter:datatype="link"/>
3441                 </fields>
3442                 <links>
3443                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3444                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3445                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3446                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3447                 </links>
3448                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3449                         <actions>
3450                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3451                                 <retrieve/>
3452                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3453                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3454                         </actions>
3455                 </permacrud>
3456         </class>
3457         <class id="aous" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_setting" oils_persist:tablename="actor.org_unit_setting" reporter:label="Organizational Unit Setting">
3458                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3459                         <field name="id" />
3460                         <field name="name"  reporter:datatype="text"/>
3461                         <field name="org_unit" reporter:datatype="org_unit"/>
3462                         <field name="value"  reporter:datatype="text"/>
3463                 </fields>
3464                 <links>
3465                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3466                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3467                 </links>
3468         </class>
3469         <class id="acpn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_note" oils_persist:tablename="asset.copy_note" reporter:label="Copy Note">
3470                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3471                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3472                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3473                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3474                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3475                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3476                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3477                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3478                 </fields>
3479                 <links>
3480                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3481                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3482                 </links>
3483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3484             <actions>
3485                 <create permission="CREATE_COPY_NOTE">
3486                     <context link="owning_copy" field="circ_lib"/>
3487                 </create>
3488                 <retrieve permission="VIEW_COPY_NOTES">
3489                     <context link="owning_copy" field="circ_lib"/>
3490                 </retrieve>
3491                 <update permission="UPDATE_COPY_NOTE">
3492                     <context link="owning_copy" field="circ_lib"/>
3493                 </update>
3494                 <delete permission="DELETE_COPY_NOTE">
3495                     <context link="owning_copy" field="circ_lib"/>
3496                 </delete>
3497             </actions>
3498         </permacrud>
3499         </class>
3500         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3501                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3502                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3503                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3504                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3505                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3506                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3507                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3508                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3509                 </fields>
3510                 <links>
3511                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3512                 </links>
3513         </class>
3514         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3515                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3516                         <field name="fingerprint"  reporter:datatype="text"/>
3517                         <field name="id" reporter:datatype="id" />
3518                         <field name="master_record" reporter:datatype="link"/>
3519                         <field name="mods"  reporter:datatype="text"/>
3520                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3521                 </fields>
3522                 <links>
3523                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3524                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3525                 </links>
3526         </class>
3527         <class id="cnal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::net_access_level" oils_persist:tablename="config.net_access_level" reporter:label="Net Access Level">
3528                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3529                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3530                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3531                 </fields>
3532                 <links/>
3533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3534             <actions>
3535                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3536                 <retrieve/>
3537                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3538                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3539             </actions>
3540         </permacrud>
3541         </class>
3542         <class id="ppl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::perm_list" oils_persist:tablename="permission.perm_list" reporter:label="Permission List">
3543                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3544                         <field name="code"  reporter:datatype="text"/>
3545                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3546                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3547                 </fields>
3548                 <links/>
3549         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3550             <actions>
3551                 <create permission="CREATE_PERM" global_required="true"/>
3552                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3553                 <update permission="UPDATE_PERM" global_required="true"/>
3554                 <delete permission="DELETE_PERM" global_required="true"/>
3555             </actions>
3556         </permacrud>
3557         </class>
3558         <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
3559                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3560                         <field name="id" reporter:datatype="id" />
3561                         <field name="metarecord" reporter:datatype="link"/>
3562                         <field name="source" reporter:datatype="link"/>
3563                 </fields>
3564                 <links>
3565                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3566                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3567                 </links>
3568         </class>
3569         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" oils_persist:tablename="metabib.facet_entry" reporter:label="Combined Facet Entry" oils_persist:readonly="true">
3570                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3571                         <field name="id" reporter:datatype="id" />
3572                         <field name="field" reporter:datatype="link"/>
3573                         <field name="source" reporter:datatype="link"/>
3574                         <field name="value"  reporter:datatype="text"/>
3575                 </fields>
3576                 <links>
3577                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3578                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3579                 </links>
3580         </class>
3581         <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">
3582                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3583                         <field name="id" reporter:datatype="id" />
3584                         <field name="value" reporter:datatype="text"/>
3585                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3586                 </fields>
3587                 <links>
3588                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3589                 </links>
3590         </class>
3591         <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">
3592                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3593                         <field name="id" reporter:datatype="id" />
3594                         <field name="entry" reporter:datatype="link"/>
3595                         <field name="def" reporter:datatype="link"/>
3596                         <field name="source" reporter:datatype="link"/>
3597                 </fields>
3598                 <links>
3599                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3600                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3601                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3602                 </links>
3603         </class>
3604         <class id="mbeshm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_simple_heading_map" oils_persist:tablename="metabib.browse_entry_simple_heading_map" reporter:label="Combined Browse Entry Simple Authority Heading Map" oils_persist:readonly="true">
3605                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3606                         <field name="id" reporter:datatype="id" />
3607                         <field name="entry" reporter:datatype="link"/>
3608                         <field name="simple_heading" reporter:datatype="link"/>
3609                 </fields>
3610                 <links>
3611                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3612                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3613                 </links>
3614         </class>
3615         <class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">
3616                 <oils_persist:source_definition>
3617                         SELECT * FROM metabib.author_field_entry
3618                                                 UNION ALL
3619                         SELECT * FROM metabib.keyword_field_entry
3620                                                 UNION ALL
3621                         SELECT * FROM metabib.identifier_field_entry
3622                                                 UNION ALL
3623                         SELECT * FROM metabib.title_field_entry
3624                                                 UNION ALL
3625                         SELECT * FROM metabib.subject_field_entry
3626                                                 UNION ALL
3627                         SELECT * FROM metabib.series_field_entry
3628                 </oils_persist:source_definition>
3629                 <fields>
3630                         <field name="field" reporter:datatype="link"/>
3631                         <field name="id" reporter:datatype="id" />
3632                         <field name="source" reporter:datatype="link"/>
3633                         <field name="value"  reporter:datatype="text"/>
3634                 </fields>
3635                 <links>
3636                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3637                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3638                 </links>
3639         </class>
3640         <class id="mkfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::keyword_field_entry" oils_persist:tablename="metabib.keyword_field_entry" reporter:label="Keyword Field Entry">
3641                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3642                         <field name="field" reporter:datatype="link"/>
3643                         <field name="id" reporter:datatype="id" />
3644                         <field name="source" reporter:datatype="link"/>
3645                         <field name="value"  reporter:datatype="text"/>
3646                 </fields>
3647                 <links>
3648                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3649                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3650                 </links>
3651         </class>
3652         <class id="mcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3653                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3654                         <field name="accepting_usr" reporter:datatype="link"/>
3655                         <field name="amount" reporter:datatype="money" />
3656                         <field name="amount_collected" reporter:datatype="money" />
3657                         <field name="cash_drawer" reporter:datatype="link"/>
3658                         <field name="id" reporter:datatype="id" />
3659                         <field name="note"  reporter:datatype="text"/>
3660                         <field name="payment_ts" reporter:datatype="timestamp"/>
3661                         <field name="xact" reporter:datatype="link"/>
3662                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3663                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3664                 </fields>
3665                 <links>
3666                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3667                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3668                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3669                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3670                 </links>
3671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3672             <actions>
3673                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3674                     <context link="xact" jump="usr" field="home_ou"/>
3675                 </retrieve>
3676                         </actions>
3677                 </permacrud>
3678         </class>
3679         <class id="mfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3680                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3681                         <field name="accepting_usr" reporter:datatype="link"/>
3682                         <field name="amount" reporter:datatype="money" />
3683                         <field name="amount_collected" reporter:datatype="money" />
3684                         <field name="id" reporter:datatype="id" />
3685                         <field name="note"  reporter:datatype="text"/>
3686                         <field name="payment_ts" reporter:datatype="timestamp"/>
3687                         <field name="xact" reporter:datatype="link"/>
3688                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3689                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3690                 </fields>
3691                 <links>
3692                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3693                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3694                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3695                 </links>
3696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3697             <actions>
3698                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3699                     <context link="xact" jump="usr" field="home_ou"/>
3700                 </retrieve>
3701                         </actions>
3702                 </permacrud>
3703         </class>
3704         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3705                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3706                         <field name="accepting_usr" reporter:datatype="link"/>
3707                         <field name="amount" reporter:datatype="money" />
3708                         <field name="amount_collected" reporter:datatype="money" />
3709                         <field name="id" reporter:datatype="id" />
3710                         <field name="note"  reporter:datatype="text"/>
3711                         <field name="payment_ts" reporter:datatype="timestamp"/>
3712                         <field name="xact" reporter:datatype="link"/>
3713                         <field name="billing" reporter:datatype="link"/>
3714                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3715                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3716                 </fields>
3717                 <links>
3718                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3719                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3720                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3721                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3722                 </links>
3723         </class>
3724         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3725                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3726                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3727                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3728                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3729                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3730                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3731                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3732                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3733                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3734                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3735                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3736                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3737                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3738                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3739                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3740                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3741                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3742                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3743                 </fields>
3744                 <links>
3745                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3746                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3747                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3748                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3749                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3750                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3751                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3752                 </links>
3753         </class>
3754
3755         <class id="csp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::standing_penalty" oils_persist:tablename="config.standing_penalty" reporter:label="Standing Penalty">
3756                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3757                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3758                         <field name="name"  reporter:datatype="text"/>
3759                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3760                         <field name="block_list" reporter:datatype="text"/>
3761                         <field name="staff_alert" reporter:datatype="bool"/>
3762                         <field name="org_depth" reporter:datatype="int"/>
3763                 </fields>
3764                 <links/>
3765         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3766             <actions>
3767                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3768                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3769                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3770                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3771             </actions>
3772         </permacrud>
3773         </class>
3774         <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">
3775                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3776                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3777                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3778                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3779                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3780                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3781                 </fields>
3782                 <links>
3783                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3784                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3785                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3786         </links>
3787         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3788             <actions>
3789                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3790                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3791                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3792                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3793             </actions>
3794         </permacrud>
3795         </class>
3796         <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">
3797                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3798                         <field name="holdable" reporter:datatype="bool"/>
3799                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3800                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3801                         <field name="opac_visible" reporter:datatype="bool"/>
3802             <field name="copy_active" reporter:datatype="bool"/>
3803             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3804                 </fields>
3805                 <links/>
3806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3807             <actions>
3808                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3809                 <retrieve/>
3810                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3811                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3812             </actions>
3813         </permacrud>
3814         </class>
3815         <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">
3816                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3817                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3818                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3819                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3820                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3821                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3822                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3823                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3824                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3825                 </fields>
3826                 <links>
3827                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3828                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3829                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3830                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3831                 </links>
3832                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3833                         <actions>
3834                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3835                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3836                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3837                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3838                         </actions>
3839                 </permacrud>
3840         </class>
3841         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3842                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3843                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3844                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3845                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3846                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3847                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3848                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3849                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3850                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3851                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3852                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3853                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3854                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3855                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3856                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3857                 </fields>
3858                 <links>
3859                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3860                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3861                 </links>
3862         </class>
3863         <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">
3864                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3865                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3866                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3867                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3868                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3869                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3870                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3871                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3872                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3873                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3874                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3875                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3876                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3877                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3878                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3879                 </fields>
3880                 <links>
3881                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3882                 </links>
3883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3884                         <actions>
3885                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3886                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3887                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3888                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3889                         </actions>
3890                 </permacrud>
3891         </class>
3892
3893
3894         <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">
3895                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3896                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3897                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3898                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3899                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3900                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3901                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3902                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3903                 </fields>
3904                 <links>
3905                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3906                 </links>
3907         </class>
3908
3909         <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">
3910                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3911                         <field name="call_number" />
3912                         <field name="create_date" reporter:datatype="timestamp"/>
3913                         <field name="creator" reporter:datatype="link"/>
3914                         <field name="id" reporter:datatype="id" />
3915                         <field name="pub" reporter:datatype="bool"/>
3916                         <field name="title"  reporter:datatype="text"/>
3917                         <field name="value"  reporter:datatype="text"/>
3918                 </fields>
3919                 <links>
3920                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3921                 </links>
3922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3923             <actions>
3924                 <create permission="CREATE_VOLUME_NOTE">
3925                     <context link="call_number" field="owning_lib"/>
3926                 </create>
3927                 <retrieve permission="VIEW_VOLUME_NOTES">
3928                     <context link="call_number" field="owning_lib"/>
3929                 </retrieve>
3930                 <update permission="UPDATE_VOLUME_NOTE">
3931                     <context link="call_number" field="owning_lib"/>
3932                 </update>
3933                 <delete permission="DELETE_VOLUME_NOTE">
3934                     <context link="call_number" field="owning_lib"/>
3935                 </delete>
3936             </actions>
3937         </permacrud>
3938         </class>
3939         <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">
3940                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3941                         <field name="create_date" reporter:datatype="timestamp"/>
3942                         <field name="creator" reporter:datatype="link"/>
3943                         <field name="edit_date" reporter:datatype="timestamp"/>
3944                         <field name="editor" reporter:datatype="link"/>
3945                         <field name="id" reporter:datatype="id" />
3946                         <field name="record" reporter:datatype="link"/>
3947                         <field name="value" reporter:datatype="text"/>
3948                 </fields>
3949                 <links>
3950                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3951                 </links>
3952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3953             <actions>
3954                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3955                 <retrieve/>
3956                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3957                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3958             </actions>
3959         </permacrud>
3960         </class>
3961         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3962         <oils_persist:source_definition>
3963 SELECT  usr,
3964         SUM(
3965             CASE
3966                 WHEN (
3967                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3968                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3969                 ) THEN 1
3970                 ELSE 0
3971             END
3972         ) AS out,
3973
3974         SUM(
3975             CASE
3976                 WHEN (
3977                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3978                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3979                 ) THEN 1
3980                 ELSE 0
3981             END
3982         ) AS overdue,
3983
3984         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3985         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
3986         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3987   FROM  action.circulation
3988   WHERE checkin_time IS NULL
3989   GROUP BY 1
3990         </oils_persist:source_definition>
3991         <fields oils_persist:primary="usr">
3992             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3993             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3994             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3995             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3996             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3997             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3998         </fields>
3999         <links>
4000             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4001         </links>
4002         </class>
4003         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4004         <oils_persist:source_definition>
4005 SELECT  usr,
4006         STRING_AGG(
4007             CASE
4008                 WHEN (
4009                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4010                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4011                 ) THEN id::TEXT
4012                 ELSE '0'
4013             END
4014         ,',') AS out,
4015
4016         STRING_AGG(
4017             CASE
4018                 WHEN (
4019                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4020                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4021                 ) THEN id::TEXT
4022                 ELSE '0'
4023             END
4024         ,',') AS overdue,
4025
4026         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4027         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4028         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4029   FROM  action.circulation
4030   WHERE checkin_time IS NULL
4031   GROUP BY 1
4032         </oils_persist:source_definition>
4033         <fields oils_persist:primary="usr">
4034             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4035             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4036             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4037             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4038             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4039             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4040         </fields>
4041         <links>
4042             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4043         </links>
4044         </class>
4045         <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">
4046                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4047                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4048                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4049                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4050                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4051                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4052                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4053                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4054                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4055                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4056                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4057                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4058                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4059                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4060                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4061                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4062                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4063                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4064                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4065                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4066                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4067                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4068                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4069                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4070                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4071                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4072                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4073                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4074                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4075                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4076                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4077                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4078                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4079                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4080                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4081                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4082                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4083                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4084                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4085                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4086                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4087                 </fields>
4088                 <links>
4089                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4090                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4091                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4092                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4093                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4094                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4095                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4096                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4097                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4098                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4099                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4100                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4101                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4102                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4103                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4104                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4105                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4106                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4107                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4108                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4109                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4110                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4111                 </links>
4112                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4113                         <actions>
4114                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4115                         </actions>
4116                 </permacrud>
4117         </class>
4118         <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">
4119                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4120                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4121                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4122                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4123                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4124                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4125                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4126                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4127                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4128                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4129                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4130                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4131                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4132                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4133                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4134                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4135                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4136                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4137                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4138                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4139                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4140                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4141                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4142                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4143                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4144                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4145                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4146                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4147                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4148                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4149                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4150                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4151                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4152                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4153                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4154                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4155                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4156                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4157                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4158                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4159                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4160                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4161                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4162                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4163                 </fields>
4164                 <links>
4165                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4166                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4167                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4168                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4169                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4170                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4171                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4172                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4173                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4174                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4175                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4176                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4177                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4178                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4179                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4180                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4181                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4182                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4183                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4184                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4185                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4186                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4187                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4188                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4189                 </links>
4190         </class>
4191         <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">
4192                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4193                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4194                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4195                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4196                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4197                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4198                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4199                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4200                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4201                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4202                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4203                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4204                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4205                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4206                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4207                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4208                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4209                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4210                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4211                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4212                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4213                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4214                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4215                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4216                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4217                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4218                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4219                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4220                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4221                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4222                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4223                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4224                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4225                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4226                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4227                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4228                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4229                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4230                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4231                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4232                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4233                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4234                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4235                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4236                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4237                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4238                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4239                 </fields>
4240                 <links>
4241                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4242                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4243                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4244                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4245                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4246                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4247                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4248                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4249                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4250                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4251                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4252                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4253                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4254                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4255                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4256                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4257                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4258                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4259                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4260                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4261                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4262                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4263                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4264                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4265                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4266                 </links>
4267         </class>
4268
4269         <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">
4270                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4271                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4272                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4273                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4274                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4275                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4276                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4277                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4278                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4279                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4280                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4281                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4282                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4283                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4284                 </fields>
4285                 <links>
4286                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4287                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4288                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4289                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4290                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4291                 </links>
4292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4293                         <actions>
4294                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4295                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4296                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4297                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4298                         </actions>
4299                 </permacrud>
4300         </class>
4301
4302         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4303                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4304                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4305                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4306                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4307                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4308                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4309                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4310                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4311                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4312                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4313                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4314                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4315                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4316                 </fields>
4317                 <links>
4318                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4319                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4320                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4321                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4322                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4323                 </links>
4324                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4325                         <actions>
4326                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4327                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4328                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4329                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4330                         </actions>
4331                 </permacrud>
4332         </class>
4333         
4334         <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">
4335                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4336                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4337                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4338                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4339                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4340                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4341                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4342                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4343                 </fields>
4344                 <links>
4345                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4346                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4347                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4348                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4349                 </links>
4350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4351                         <actions>
4352                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4353                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4354                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4355                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4356                         </actions>
4357                 </permacrud>
4358         </class>
4359         
4360         <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">
4361                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4362                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4363                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4364                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4365                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4366                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4367                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4368                 </fields>
4369                 <links>
4370                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4371                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4372                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4373                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4374                 </links>
4375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4376                         <actions>
4377                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4378                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4379                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4380                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4381                         </actions>
4382                 </permacrud>
4383         </class>
4384         
4385         <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">
4386                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4387                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4388                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4389                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4390                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4391                 </fields>
4392                 <links>
4393                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4394                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4395                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4396                 </links>
4397                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4398                         <actions>
4399                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4400                     <context link="resource" field="owner" />
4401                 </create>
4402                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4403                     <context link="resource" field="owner" />
4404                 </retrieve>
4405                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4406                     <context link="resource" field="owner" />
4407                 </update>
4408                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4409                     <context link="resource" field="owner" />
4410                 </delete>
4411                         </actions>
4412                 </permacrud>
4413         </class>
4414         
4415         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4416                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4417                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4418                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4419                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4420                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4421                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4422                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4423                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4424                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4425                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4426                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4427                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4428                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4429                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4430                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4431                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4432                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4433                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4434                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4435                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4436                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4437                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4438                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4439                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4440                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4441                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4442                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4443                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4444                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4445                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4446                 </fields>
4447                 <links>
4448                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4449                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4450                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4451                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4452                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4453                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4454                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4455                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4456                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4457                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4458                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4459                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4460                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4461                 </links>
4462                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4463                         <actions>
4464                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4465                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4466                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4467                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4468                         </actions>
4469                 </permacrud>
4470         </class>
4471         
4472         <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">
4473                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4474                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4475                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4476                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4477                 </fields>
4478                 <links>
4479                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4480                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4481                 </links>
4482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4483                         <actions>
4484                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4485                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4486                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4487                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4488                         </actions>
4489                 </permacrud>
4490         </class>
4491
4492         <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">
4493                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4494                         <field name="bucket" reporter:datatype="link"/>
4495                         <field name="id" reporter:datatype="id" />
4496                         <field name="target_call_number" reporter:datatype="link" />
4497                         <field name="create_time" reporter:datatype="timestamp" />
4498                         <field name="pos" reporter:datatype="int" />
4499                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4500                 </fields>
4501                 <links>
4502                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4503                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4504             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4505                 </links>
4506         </class>
4507         <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">
4508                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4509                         <field name="id" reporter:datatype="id" />
4510                         <field name="item" reporter:datatype="link"/>
4511                         <field name="note" reporter:datatype="text" />
4512                 </fields>
4513                 <links>
4514                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4515                 </links>
4516         </class>
4517         <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">
4518                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4519                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4520                         <field name="btype" reporter:datatype="text"/>
4521                         <field name="id" reporter:datatype="id" />
4522                         <field name="name" reporter:datatype="text"/>
4523                         <field name="description" reporter:datatype="text"/>
4524                         <field name="owner" reporter:datatype="link"/>
4525                         <field name="pub" reporter:datatype="bool"/>
4526                         <field name="create_time" reporter:datatype="timestamp" />
4527                 </fields>
4528                 <links>
4529                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4530                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4531                 </links>
4532         </class>
4533         <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">
4534                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4535                         <field name="id" reporter:datatype="id" />
4536                         <field name="bucket" reporter:datatype="link"/>
4537                         <field name="note" reporter:datatype="text" />
4538                 </fields>
4539                 <links>
4540                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4541                 </links>
4542         </class>
4543         <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">
4544                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4545                         <field name="hold" reporter:datatype="link"/>
4546                         <field name="id" reporter:datatype="id" />
4547                         <field name="target_copy" reporter:datatype="link"/>
4548                         <field name="proximity" reporter:datatype="number"/>
4549                 </fields>
4550                 <links>
4551                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4552                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4553                 </links>
4554         </class>
4555         <class id="ahn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4556                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4557                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4558                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4559                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4560                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4561                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4562                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4563                 </fields>
4564                 <links>
4565                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4566                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4567                 </links>
4568         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4569             <actions>
4570                 <create permission="CREATE_HOLD_NOTIFICATION">
4571                                         <context link="hold" jump="usr" field="home_ou" />
4572                                 </create>
4573                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4574                                         <context link="hold" jump="usr" field="home_ou" />
4575                                 </retrieve>
4576                 <update permission="CREATE_HOLD_NOTIFICATION">
4577                                         <context link="hold" jump="usr" field="home_ou" />
4578                                 </update>
4579                 <delete permission="CREATE_HOLD_NOTIFICATION">
4580                                         <context link="hold" jump="usr" field="home_ou" />
4581                                 </delete>
4582             </actions>
4583         </permacrud>
4584         </class>
4585         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location"  oils_persist:field_safe="true">
4586                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4587                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4588                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4589                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4590                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4591                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4592                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4593                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4594                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4595                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4596                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4597                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4598                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4599                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4600                 </fields>
4601                 <links>
4602                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4603                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4604                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4605                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4606                 </links>
4607         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4608             <actions>
4609                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4610                 <retrieve/>
4611                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4612                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4613             </actions>
4614         </permacrud>
4615         </class>
4616         <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">
4617                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4618                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4619                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4620                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4621                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4622             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4623             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4624             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4625                 </fields>
4626                 <links>
4627                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4628                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4629                 </links>
4630         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4631             <actions>
4632                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4633                 <retrieve/>
4634                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4635                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4636             </actions>
4637         </permacrud>
4638         </class>
4639         <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">
4640                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4641                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4642             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4643             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4644                 </fields>
4645                 <links>
4646                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4647                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4648                 </links>
4649         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4650             <actions>
4651                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4652                                         <context link="lgroup" field="owner" />
4653                 </create>
4654                 <retrieve/>
4655                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4656                                         <context link="lgroup" field="owner" />
4657                 </update>
4658                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4659                                         <context link="lgroup" field="owner" />
4660                 </delete>
4661             </actions>
4662         </permacrud>
4663         </class>
4664
4665     <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">
4666         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4667             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4668             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4669             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4670             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4671         </fields>
4672         <links>
4673             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4674             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4675         </links>
4676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4677             <actions>
4678                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4679                 <retrieve/>
4680                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4681                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4682             </actions>
4683         </permacrud>
4684     </class>
4685
4686         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4687                 <fields>
4688                         <field name="sre_id" oils_persist:virtual="true" />
4689                         <field name="location" oils_persist:virtual="true" />
4690                         <field name="owning_lib" oils_persist:virtual="true" />
4691                         <field name="basic_holdings" oils_persist:virtual="true" />
4692                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4693                         <field name="supplement_holdings" oils_persist:virtual="true" />
4694                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4695                         <field name="index_holdings" oils_persist:virtual="true" />
4696                         <field name="index_holdings_add" oils_persist:virtual="true" />
4697                         <field name="online" oils_persist:virtual="true" />
4698                         <field name="missing" oils_persist:virtual="true" />
4699                         <field name="incomplete" oils_persist:virtual="true" />
4700                 </fields>
4701         </class>
4702
4703         <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">
4704                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4705                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4706                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4707                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4708                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4709                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4710                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4711                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4712                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4713                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4714                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4715                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4716                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4717                 </fields>
4718                 <links>
4719                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4720                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4721                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4722                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4723                 </links>
4724                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4725                         <actions>
4726                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4727                                 <retrieve/>
4728                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4729                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4730                         </actions>
4731                 </permacrud>
4732         </class>
4733
4734         <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">
4735                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4736                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4737                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4738                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4739                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4740                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4741                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4742                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4743                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4744                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4745                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4746                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4747                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4748                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4749                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4750                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4751                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4752                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4753                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4754                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4755                 </fields>
4756                 <links>
4757                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4758                 </links>
4759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4760                         <actions>
4761                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4762                                         <context link="subscription" field="owning_lib" />
4763                                 </create>
4764                                 <retrieve />
4765                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4766                                         <context link="subscription" field="owning_lib" />
4767                                 </update>
4768                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4769                                         <context link="subscription" field="owning_lib" />
4770                                 </delete>
4771                         </actions>
4772                 </permacrud>
4773         </class>
4774
4775         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4776                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4777                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4778                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4779                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4780                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4781                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4782                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4783                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4784                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4785                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4786                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4787                 </fields>
4788                 <links>
4789                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4790                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4791                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4792                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4793                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4794                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4795                 </links>
4796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4797                         <actions>
4798                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4799                                 <retrieve />
4800                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4801                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4802                         </actions>
4803                 </permacrud>
4804         </class>
4805
4806         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4807                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4808                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4809                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4810                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4811                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4812                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4813                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4814                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4815                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4816                 </fields>
4817                 <links>
4818                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4819                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4820                 </links>
4821         </class>
4822
4823         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4824                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4825                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4826                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4827                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4828                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4829                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4830                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4831                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4832                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4833                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4834                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4835                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4836                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4837                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4838                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4839                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4840                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4841                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4842                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4843                 </fields>
4844                 <links>
4845                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4846                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4847                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4848                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4849                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4850                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4851                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4852                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4853                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4854                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4855                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4856                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4857                 </links>
4858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4859                         <actions>
4860                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4861                                 <retrieve />
4862                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4863                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4864                         </actions>
4865                 </permacrud>
4866         </class>
4867
4868         <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">
4869                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4870                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4871                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4872                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4873                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4874                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4875                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4876                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4877                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4878                 </fields>
4879                 <links>
4880                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4881                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4882                 </links>
4883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4884                         <actions>
4885                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4886                                         <context link="distribution" field="holding_lib" />
4887                                 </create>
4888                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4889                                         <context link="distribution" field="holding_lib" />
4890                                 </retrieve>
4891                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4892                                         <context link="distribution" field="holding_lib" />
4893                                 </update>
4894                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4895                                         <context link="distribution" field="holding_lib" />
4896                                 </delete>
4897                         </actions>
4898                 </permacrud>
4899         </class>
4900
4901         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4902                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4903                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4904                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4905                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4906                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4907                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4908                 </fields>
4909                 <links>
4910                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4911                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4912                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4913                 </links>
4914                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4915                         <actions>
4916                                 <create permission="ADMIN_SERIAL_STREAM">
4917                                         <context link="distribution" field="holding_lib" />
4918                                 </create>
4919                                 <retrieve />
4920                                 <update permission="ADMIN_SERIAL_STREAM">
4921                                         <context link="distribution" field="holding_lib" />
4922                                 </update>
4923                                 <delete permission="ADMIN_SERIAL_STREAM">
4924                                         <context link="distribution" field="holding_lib" />
4925                                 </delete>
4926                         </actions>
4927                 </permacrud>
4928         </class>
4929
4930         <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">
4931                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4932                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4933                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4934                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4935                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4936                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4937                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4938                 </fields>
4939                 <links>
4940                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4941                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4942                 </links>
4943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4944                         <actions>
4945                                 <create permission="ADMIN_SERIAL_STREAM">
4946                                         <context link="stream" jump="distribution" field="holding_lib" />
4947                                 </create>
4948                                 <retrieve permission="RECEIVE_SERIAL">
4949                                         <context link="stream" jump="distribution" field="holding_lib" />
4950                                 </retrieve>
4951                                 <update permission="ADMIN_SERIAL_STREAM">
4952                                         <context link="stream" jump="distribution" field="holding_lib" />
4953                                 </update>
4954                                 <delete permission="ADMIN_SERIAL_STREAM">
4955                                         <context link="stream" jump="distribution" field="holding_lib" />
4956                                 </delete>
4957                         </actions>
4958                 </permacrud>
4959         </class>
4960
4961         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4962                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4963                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4964                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4965                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4966                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4967                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4968                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4969                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4970                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4971                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4972                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4973                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4974                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4975                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4976                 </fields>
4977                 <links>
4978                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4979                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4980                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4981                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4982                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4983                 </links>
4984                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4985                         <actions>
4986                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4987                                         <context link="subscription" field="owning_lib" />
4988                                 </create>
4989                                 <retrieve/>
4990                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4991                                         <context link="subscription" field="owning_lib" />
4992                                 </update>
4993                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4994                                         <context link="subscription" field="owning_lib" />
4995                                 </delete>
4996                         </actions>
4997                 </permacrud>
4998         </class>
4999
5000         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5001                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5002                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5003                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5004                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5005                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5006                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5007                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5008                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5009                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5010                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5011                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5012                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5013                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5014                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5015                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5016                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5017                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5018                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5019                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5020                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5021                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5022                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5023                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5024                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5025                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5026                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5027                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5028                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5029                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5030                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5031                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5032                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5033                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5034                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5035                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5036                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5037                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5038                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5039                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5040                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5041                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5042                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5043                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5044                 </fields>
5045                 <links>
5046                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5047                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5048                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5049                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5050                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5051                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5052                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5053                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5054                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5055                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5056                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5057                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5058                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5059                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5060                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5061                 </links>
5062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5063                         <actions>
5064                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5065                                 <retrieve/>
5066                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5067                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5068                         </actions>
5069                 </permacrud>
5070         </class>
5071
5072         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5073                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5074                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5075                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5076                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5077                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5078                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5079                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5080                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5081                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5082                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5083                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5084                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5085                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5086                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5087                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5088                 </fields>
5089                 <links>
5090                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5091                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5092                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5093                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5094                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5095                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5096                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5097                 </links>
5098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5099                         <actions>
5100                                 <create permission="ADMIN_SERIAL_ITEM">
5101                                         <context link="stream" jump="distribution" field="holding_lib" />
5102                                 </create>
5103                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5104                                         <context link="stream" jump="distribution" field="holding_lib" />
5105                                 </retrieve>
5106                                 <update permission="ADMIN_SERIAL_ITEM">
5107                                         <context link="stream" jump="distribution" field="holding_lib" />
5108                                 </update>
5109                                 <delete permission="ADMIN_SERIAL_ITEM">
5110                                         <context link="stream" jump="distribution" field="holding_lib" />
5111                                 </delete>
5112                         </actions>
5113                 </permacrud>
5114         </class>
5115
5116         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5117                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5118                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5119                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5120                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5121                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5122                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5123                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5124                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5125                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5126                 </fields>
5127                 <links>
5128                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5129                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5130                 </links>
5131                 <!-- Not available via PCRUD at this time -->
5132         </class>
5133         <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">
5134                 <fields>
5135                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5136                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5137                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5138                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5139                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5140                 </fields>
5141                 <links>
5142                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5143                 </links>
5144         </class>
5145         <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">
5146                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5147                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5148                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5149                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5150                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5151                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5152                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5153                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5154                 </fields>
5155                 <links>
5156                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5157                 </links>
5158         </class>
5159         <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">
5160                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5161                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5162                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5163                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5164                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5165                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5166                 </fields>
5167                 <links>
5168                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5169                 </links>
5170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5171                         <actions>
5172                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5173                                         <context link="distribution" field="holding_lib" />
5174                                 </create>
5175                                 <retrieve/>
5176                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5177                                         <context link="distribution" field="holding_lib" />
5178                                 </update>
5179                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5180                                         <context link="distribution" field="holding_lib" />
5181                                 </delete>
5182                         </actions>
5183                 </permacrud>
5184         </class>
5185
5186         <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">
5187                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5188                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5189                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5190                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5191                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5192                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5193                 </fields>
5194                 <links>
5195                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5196                 </links>
5197                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5198                         <actions>
5199                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5200                                         <context link="distribution" field="holding_lib" />
5201                                 </create>
5202                                 <retrieve/>
5203                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5204                                         <context link="distribution" field="holding_lib" />
5205                                 </update>
5206                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5207                                         <context link="distribution" field="holding_lib" />
5208                                 </delete>
5209                         </actions>
5210                 </permacrud>
5211         </class>
5212
5213         <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">
5214                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5215                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5216                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5217                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5218                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5219                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5220                 </fields>
5221                 <links>
5222                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5223                 </links>
5224                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5225                         <actions>
5226                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5227                                         <context link="distribution" field="holding_lib" />
5228                                 </create>
5229                                 <retrieve/>
5230                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5231                                         <context link="distribution" field="holding_lib" />
5232                                 </update>
5233                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5234                                         <context link="distribution" field="holding_lib" />
5235                                 </delete>
5236                         </actions>
5237                 </permacrud>
5238         </class>
5239
5240         <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">
5241                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5242                         <field name="id" reporter:datatype="id" />
5243                         <field name="owning_copy" reporter:datatype="link"/>
5244                         <field name="stat_cat" reporter:datatype="link"/>
5245                         <field name="stat_cat_entry" reporter:datatype="link"/>
5246                 </fields>
5247                 <links>
5248                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5249                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5250                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5251                 </links>
5252         </class>
5253         <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">
5254                 <fields oils_persist:primary="code">
5255                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5256                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5257                 </fields>
5258                 <links/>
5259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5260             <actions>
5261                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5262                 <retrieve/>
5263                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5264                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5265             </actions>
5266         </permacrud>
5267         </class>
5268         <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">
5269                 <fields oils_persist:primary="code">
5270                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5271                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5272                 </fields>
5273                 <links/>
5274         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5275             <actions>
5276                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5277                 <retrieve/>
5278                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5279                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5280             </actions>
5281         </permacrud>
5282         </class>
5283         <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">
5284                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5285                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5286                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5287                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5288                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5289                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5290                 </fields>
5291                 <links>
5292             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5293         </links>
5294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5295             <actions>
5296                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5297                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5298                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5299                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5300             </actions>
5301         </permacrud>
5302         </class>
5303         <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">
5304                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5305                         <field name="id" reporter:datatype="id" />
5306                         <field name="name" reporter:datatype="text"/>
5307                 </fields>
5308                 <links/>
5309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5310             <actions>
5311                 <create permission="CREATE_LASSO" global_required="true"/>
5312                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5313                 <update permission="UPDATE_LASSO" global_required="true"/>
5314                 <delete permission="DELETE_LASSO" global_required="true"/>
5315             </actions>
5316         </permacrud>
5317         </class>
5318         <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">
5319                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5320                         <field name="id" reporter:datatype="id" />
5321                         <field name="lasso" reporter:datatype="link"/>
5322                         <field name="org_unit" reporter:datatype="org_unit"/>
5323                 </fields>
5324                 <links>
5325                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5326                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5327                 </links>
5328         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5329             <actions>
5330                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5331                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5332                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5333                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5334             </actions>
5335         </permacrud>
5336         </class>
5337         <class id="aoupa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_proximity_adjustment" oils_persist:tablename="actor.org_unit_proximity_adjustment" reporter:label="Org Unit Proximity Adjustment">
5338                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5339                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5340                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5341                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5342                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5343                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5344                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5345                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5346                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5347                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5348                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5349                 </fields>
5350                 <links>
5351                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5352                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5353                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5354                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5355                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5356                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5357                 </links>
5358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5359             <actions>
5360                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5361                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5362                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5363                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5364             </actions>
5365         </permacrud>
5366         </class>
5367         <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">
5368                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5369                         <field name="id" reporter:datatype="id" />
5370                         <field name="from_org" reporter:datatype="org_unit"/>
5371                         <field name="to_org" reporter:datatype="org_unit"/>
5372                         <field name="prox" reporter:datatype="int" />
5373                 </fields>
5374                 <links>
5375                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5376                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5377                 </links>
5378         </class>
5379         <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">
5380                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5381                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5382                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5383                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5384                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5385                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5386                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5387                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5388                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5389                 </fields>
5390                 <links/>
5391         </class>
5392         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5393                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5394                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5395                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5396                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5397                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5398                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5399                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5400                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5401                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5402                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5403                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5404                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5405                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5406                 </fields>
5407                 <links>
5408                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5409                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5410                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5411                 </links>
5412         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5413             <actions>
5414                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5415                 <retrieve/>
5416                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5417                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5418             </actions>
5419         </permacrud>
5420         </class>
5421         <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">
5422                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5423                         <field name="address_type"  reporter:datatype="text"/>
5424                         <field name="city"  reporter:datatype="text"/>
5425                         <field name="country"  reporter:datatype="text"/>
5426                         <field name="county"  reporter:datatype="text"/>
5427                         <field name="id" reporter:datatype="id" />
5428                         <field name="org_unit" reporter:datatype="org_unit"/>
5429                         <field name="post_code"  reporter:datatype="text"/>
5430                         <field name="state"  reporter:datatype="text"/>
5431                         <field name="street1"  reporter:datatype="text"/>
5432                         <field name="street2"  reporter:datatype="text"/>
5433                         <field name="valid" reporter:datatype="bool"/>
5434                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5435                 </fields>
5436                 <links>
5437                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5438                 </links>
5439         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5440             <actions>
5441                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5442                 <retrieve/>
5443                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5444                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5445             </actions>
5446         </permacrud>
5447         </class>
5448         <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">
5449                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5450                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5451                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5452                         <field name="query_text" reporter:datatype="text"/>
5453                 </fields>
5454         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5455             <actions>
5456                 <retrieve/>
5457             </actions>
5458         </permacrud>
5459         </class>
5460
5461         <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">
5462                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5463                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5464                         <field name="owner" reporter:datatype="org_unit"/>
5465                         <field name="code" reporter:datatype="text"/>
5466                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5467                         <field name="create_date" reporter:datatype="timestamp"/>
5468                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5469                 </fields>
5470                 <links>
5471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5472                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5473                 </links>
5474         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5475             <actions>
5476                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5477                 <retrieve/>
5478                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5479                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5480             </actions>
5481         </permacrud>
5482         </class>
5483         <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">
5484                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5485                         <field name="id" reporter:datatype="id"/>
5486                         <field name="grp" reporter:datatype="link"/>
5487                         <field name="pos" reporter:datatype="int"/>
5488                         <field name="query" reporter:datatype="link"/>
5489                 </fields>
5490                 <links>
5491                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5492                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5493                 </links>
5494         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5495             <actions>
5496                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5497                     <context link="grp" field="owner"/>
5498                 </create>
5499                 <retrieve/>
5500                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5501                     <context link="grp" field="owner"/>
5502                 </update>
5503                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5504                     <context link="grp" field="owner"/>
5505                 </delete>
5506             </actions>
5507         </permacrud>
5508         </class>
5509
5510         <!-- A note: Please update alhr and ahopl when updating ahr -->
5511         <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">
5512                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5513                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5514                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5515                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5516                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5517                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5518                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5519                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5520                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5521                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5522                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5523                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5524                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5525                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5526                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5527                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5528                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5529                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5530                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5531                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5532                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5533                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5534                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5535                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5536                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5537                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5538                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5539                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5540                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5541                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5542                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5543                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5544                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5545                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5546                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5547                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5548                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5549                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5550                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5551                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5552                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5553                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5554                 </fields>
5555                 <links>
5556                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5557                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5558                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5559                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5560                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5561                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5562                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5563                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5564                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5565                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5566                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5567                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5568                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5569                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5570                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5571                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5572                 </links>
5573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5574                         <actions>
5575                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5576                         </actions>
5577                 </permacrud>
5578         </class>
5579         <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">
5580                 <oils_persist:source_definition><![CDATA[
5581                 SELECT
5582                         ahr.*,
5583                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5584                                 copy_location_order_position,
5585                         CASE WHEN au.alias IS NOT NULL THEN
5586                                 au.alias
5587                         ELSE
5588                                 au.first_given_name
5589                         END AS usr_alias_or_first_given_name,
5590                         au.first_given_name AS usr_first_given_name,
5591                         au.second_given_name AS usr_second_given_name,
5592                         au.family_name AS usr_family_name,
5593                         au.prefix AS usr_prefix,
5594                         au.suffix AS usr_suffix,
5595                         au.alias AS usr_alias,
5596                         CASE WHEN au.alias IS NOT NULL THEN
5597                                 au.alias
5598                         ELSE
5599                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5600                                         COALESCE(au.family_name, ''),
5601                                         COALESCE(au.suffix, ''),
5602                                         ', ',
5603                                         COALESCE(au.prefix, ''),
5604                                         COALESCE(au.first_given_name, ''),
5605                                         COALESCE(au.second_given_name, '')
5606                                 ], ' '), E'\\s+,', ',')
5607                         END AS usr_alias_or_display_name,
5608                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5609                                 COALESCE(au.family_name, ''),
5610                                 COALESCE(au.suffix, ''),
5611                                 ', ',
5612                                 COALESCE(au.prefix, ''),
5613                                 COALESCE(au.first_given_name, ''),
5614                                 COALESCE(au.second_given_name, '')
5615                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5616                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5617                                 AS call_number_label,
5618                         siss.label AS issuance_label,
5619                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5620                         ahcm_1.copy_count AS potential_copies
5621                 FROM action.hold_request ahr
5622                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5623                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5624                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5625                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5626                 JOIN actor.usr au ON (au.id = ahr.usr)
5627                 JOIN (
5628                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5629                         FROM asset.copy_location
5630                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5631                 LEFT JOIN actor.usr_standing_penalty ausp 
5632                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5633                 LEFT JOIN config.standing_penalty csp
5634                         ON (
5635                                 csp.id = ausp.standing_penalty AND 
5636                                 csp.block_list LIKE '%CAPTURE%' AND (
5637                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5638                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5639                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5640                                         )
5641                                 )
5642                         )
5643                 JOIN (
5644                         SELECT COUNT(target_copy) AS copy_count, hold
5645                         FROM action.hold_copy_map
5646                         GROUP BY 2
5647                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5648                 LEFT JOIN serial.issuance siss
5649                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5650                 LEFT JOIN asset.copy_location_order acplo
5651                         ON (acp.location = acplo.location AND
5652                                 acp.circ_lib = acplo.org)
5653                 WHERE
5654                         ahr.capture_time IS NULL AND
5655                         ahr.cancel_time IS NULL AND
5656                         csp.id IS NULL AND
5657                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5658                         acp.status IN (0,7)
5659                 ]]></oils_persist:source_definition>
5660                 <fields oils_persist:primary="id">
5661                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5662                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5663                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5664                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5665                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5666                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5667                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5668                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5669                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5670                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5671                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5672                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5673                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5674                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5675                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5676                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5677                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5678                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5679                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5680                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5681                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5682                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5683                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5684                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5685                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5686                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5687                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5688                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5689                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5690                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5691                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5692                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5693                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5694                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5695                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5696                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5697                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5698                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5699                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5700                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5701                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5702                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5703                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5704                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5705                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5706                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5707                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5708                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5709                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5710                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5711                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5712                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5713                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5714                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5715                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5716                 </fields>
5717                 <links>
5718                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5719                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5720                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5721                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5722                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5723                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5724                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5725                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5726                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5727                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5728                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5729                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5730                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5731                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5732                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5733                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5734                 </links>
5735                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5736                         <actions>
5737                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5738                         </actions>
5739                 </permacrud>
5740         </class>
5741         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5742                 <oils_persist:source_definition>
5743                         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)
5744                 </oils_persist:source_definition>
5745                 <fields oils_persist:primary="id">
5746                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5747                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5748                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5749                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5750                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5751                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5752                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5753                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5754                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5755                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5756                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5757                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5758                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5759                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5760                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5761                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5762                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5763                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5764                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5765                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5766                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5767                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5768                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5769                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5770                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5771                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5772                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5773                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5774                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5775                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5776                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5777                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5778                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5779                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5780                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5781                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5782                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5783                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5784                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5785                 </fields>
5786                 <links>
5787                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5788                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5789                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5790                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5791                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5792                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5793                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5794                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5795                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5796                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5797                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5798                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5799                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5800                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5801                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5802                 </links>
5803         </class>
5804
5805         <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">
5806                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5807                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5808                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5809                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5810                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5811                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5812                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5813                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5814                 </fields>
5815                 <links>
5816                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5817                 </links>
5818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5819                         <actions>
5820                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5821                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5822                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5823                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5824                         </actions>
5825                 </permacrud>
5826         </class>
5827         <class id="combahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_hold_request" oils_persist:tablename="action.all_hold_request" reporter:core="true" reporter:label="Combined (Active &amp; Aged) Hold Request">
5828                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5829                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5830                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5831                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5832                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5833                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5834                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5835                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5836                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5837                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5838                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5839                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5840                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5841                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5842                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5843                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5844                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5845                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5846                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5847                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5848                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5849                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5850                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5851                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5852                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5853                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5854                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5855                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5856                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5857                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5858                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5859                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5860                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5861                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5862                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5863                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5864                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5865                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5866                 </fields>
5867                 <links>
5868                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5869                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5870                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5871                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5872                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5873                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5874                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5875                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5876                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5877                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5878                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5879                 </links>
5880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5881                         <actions>
5882                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5883                         </actions>
5884                 </permacrud>
5885         </class>
5886         <class id="aahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::aged_hold_request" oils_persist:tablename="action.aged_hold_request" reporter:core="true" reporter:label="Aged Hold Request">
5887                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5888                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5889                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5890                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5891                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5892                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5893                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5894                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5895                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5896                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5897                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5898                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5899                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5900                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5901                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5902                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5903                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5904                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5905                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5906                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5907                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5908                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5909                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5910                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5911                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5912                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5913                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5914                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5915                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5916                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5917                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5918                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5919                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5920                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5921                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5922                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5923                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5924                 </fields>
5925                 <links>
5926                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5927                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5928                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5929                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5930                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5931                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5932                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5933                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5934                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5935                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5936                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5937                 </links>
5938                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5939                         <actions>
5940                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5941                         </actions>
5942                 </permacrud>
5943         </class>
5944
5945         <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">
5946                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5947                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5948                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5949                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5950                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5951                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5952                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5953                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5954                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5955                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5956                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5957                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5958                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5959                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5960                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5961                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5962                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5963                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5964                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5965                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5966                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5967                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5968                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5969                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5970                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5971                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5972                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5973                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5974                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5975                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5976                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5977                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5978                 </fields>
5979                 <links>
5980                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5981                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5982                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5983                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5984                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5985                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5986                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5987                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5988                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5989                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5990                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5991                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5992                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5993                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5994                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5995                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5996                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5997                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5998                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5999                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6000                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6001                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6002                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6003                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6004                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6005                 </links>
6006         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6007             <actions>
6008                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6009                 <retrieve />
6010                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6011                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6012             </actions>
6013         </permacrud>
6014         </class>
6015         <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">
6016                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6017                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6018                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6019                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6020                 </fields>
6021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6022                         <actions>
6023                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6024                                 <retrieve/>
6025                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6026                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6027                         </actions>
6028                 </permacrud>
6029         </class>
6030         <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">
6031                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6032                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6033                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6034                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6035                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6036                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6037                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6038                 </fields>
6039                 <links>
6040                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6041                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6042                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6043                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6044                 </links>
6045                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6046                         <actions>
6047                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6048                                 <retrieve/>
6049                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6050                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6051                         </actions>
6052                 </permacrud>
6053         </class>
6054         <class id="ccnb" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
6055                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6056                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6057                         <field name="btype" reporter:datatype="text"/>
6058                         <field name="id" reporter:datatype="id" />
6059                         <field name="name"  reporter:datatype="text"/>
6060                         <field name="description" reporter:datatype="text"/>
6061                         <field name="owner" reporter:datatype="link"/>
6062                         <field name="pub" reporter:datatype="bool"/>
6063                         <field name="create_time" reporter:datatype="timestamp" />
6064                 </fields>
6065                 <links>
6066                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6067                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6068                 </links>
6069         </class>
6070         <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">
6071                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6072                         <field name="id" reporter:datatype="id" />
6073                         <field name="bucket" reporter:datatype="link"/>
6074                         <field name="note" reporter:datatype="text" />
6075                 </fields>
6076                 <links>
6077                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6078                 </links>
6079         </class>
6080         <class id="asc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
6081                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6082                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6083                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6084                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6085                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6086                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6087                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6088                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6089                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6090                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6091                 </fields>
6092                 <links>
6093                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6094                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6095                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6096                 </links>
6097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6098                         <actions>
6099                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6100                         </actions>
6101                 </permacrud>
6102         </class>
6103         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6104                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6105                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6106                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6107                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6108                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6109                 </fields>
6110                 <links>
6111                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6112                 </links>
6113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6114                         <actions>
6115                                 <retrieve permission="VIEW_USER">
6116                                         <context link="usr" field="home_ou" />
6117                                 </retrieve>
6118                         </actions>
6119                 </permacrud>
6120         </class>
6121     <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">
6122         <fields oils_persist:primary="field">
6123             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6124             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6125             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6126         </fields>
6127         <links/>
6128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6129             <actions>
6130                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6131                 <retrieve />
6132                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6133                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6134             </actions>
6135         </permacrud>
6136     </class>
6137         <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">
6138                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6139                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6140                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6141                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6142                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6143                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6144                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6145                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6146                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6147                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6148                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6149                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6150                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6151                 </fields>
6152                 <links>
6153                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6154                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6155                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6156                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6157                 </links>
6158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6159             <actions>
6160                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6161                 <retrieve />
6162                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6163                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6164             </actions>
6165         </permacrud>
6166         </class>
6167         <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">
6168                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6169                         <field name="field" reporter:datatype="link"/>
6170                         <field name="id" reporter:datatype="id" />
6171                         <field name="source" reporter:datatype="link"/>
6172                         <field name="value"  reporter:datatype="text"/>
6173                 </fields>
6174                 <links>
6175                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6176                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6177                 </links>
6178         </class>
6179         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6180                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6181                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6182                         <field name="btype" reporter:datatype="text"/>
6183                         <field name="id" reporter:datatype="id" />
6184                         <field name="name"  reporter:datatype="text"/>
6185                         <field name="description" reporter:datatype="text"/>
6186                         <field name="owner" reporter:datatype="link"/>
6187                         <field name="pub" reporter:datatype="bool"/>
6188                         <field name="create_time" reporter:datatype="timestamp" />
6189                 </fields>
6190                 <links>
6191                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6192                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6193                 </links>
6194         </class>
6195         <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">
6196                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6197                         <field name="id" reporter:datatype="id" />
6198                         <field name="bucket" reporter:datatype="link"/>
6199                         <field name="note" reporter:datatype="text" />
6200                 </fields>
6201                 <links>
6202                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6203                 </links>
6204         </class>
6205         <class id="mcrp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
6206                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6207                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6208                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6209                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6210                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6211                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6212                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6213                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6214                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6215                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6216                 </fields>
6217                 <links>
6218                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6219                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6220                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6221                 </links>
6222         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6223             <actions>
6224                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6225                     <context link="xact" jump="usr" field="home_ou"/>
6226                 </retrieve>
6227                         </actions>
6228                 </permacrud>
6229         </class>
6230         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6231                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6232                         <field name="id" reporter:datatype="id" />
6233                         <field name="ind1" />
6234                         <field name="ind2" />
6235                         <field name="record" />
6236                         <field name="subfield" />
6237                         <field name="tag" />
6238                         <field name="value" />
6239                 </fields>
6240                 <links>
6241                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6242                 </links>
6243         </class>
6244         <class id="aalink" controller="open-ils.cstore" oils_obj:fieldmapper="authority::authority_linking" oils_persist:tablename="authority.authority_linking" reporter:label="Authority to Authority Linking">
6245                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6246                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6247                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6248                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6249                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6250                 </fields>
6251                 <links>
6252                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6253                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6254                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6255                 </links>
6256         </class>
6257         <class id="cnct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
6258                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6259                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6260                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6261                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6262                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6263                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6264                 </fields>
6265                 <links>
6266                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6267                 </links>
6268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6269             <actions>
6270                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6271                 <retrieve/>
6272                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6273                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6274             </actions>
6275         </permacrud>
6276
6277         </class>
6278         <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">
6279                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6280                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6281                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6282                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6283                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6284                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6285                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6286                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6287                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6288                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6289                 </fields>
6290                 <links>
6291                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6292                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6293                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6294                 </links>
6295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6296             <actions>
6297                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6298                 <retrieve/>
6299                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6300                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6301             </actions>
6302         </permacrud>
6303         </class>
6304         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6305                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6306                         <field name="create_date" reporter:datatype="timestamp"/>
6307                         <field name="creator" reporter:datatype="link"/>
6308                         <field name="edit_date" reporter:datatype="timestamp"/>
6309                         <field name="editor" reporter:datatype="link"/>
6310                         <field name="id" reporter:datatype="id" />
6311                         <field name="pub" reporter:datatype="bool"/>
6312                         <field name="record" reporter:datatype="link"/>
6313                         <field name="value"  reporter:datatype="text"/>
6314                 </fields>
6315                 <links>
6316                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6317                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6318                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6319                 </links>
6320         </class>
6321         <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">
6322                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6323                         <field name="balance_owed" reporter:datatype="money" />
6324                         <field name="total_owed" reporter:datatype="money" />
6325                         <field name="total_paid" reporter:datatype="money" />
6326                         <field name="usr" reporter:datatype="link"/>
6327                 </fields>
6328                 <links>
6329                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6330                 </links>
6331         </class>
6332         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6333                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6334                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6335                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6336                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6337                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6338                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6339                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6340                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6341                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6342                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6343                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6344                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6345                 </fields>
6346                 <links>
6347                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6348                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6349                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6350                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6351                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6352                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6353                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6354                 </links>
6355         </class>
6356         <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">
6357                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6358                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6359                         <field name="quality" reporter:datatype="int" />
6360                         <field name="source" reporter:datatype="text"/>
6361                         <field name="transcendant" reporter:datatype="bool"/>
6362                         <field name="can_have_copies" reporter:datatype="bool"/>
6363                 </fields>
6364                 <links/>
6365         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6366             <actions>
6367                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6368                 <retrieve/>
6369                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6370                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6371             </actions>
6372         </permacrud>
6373         </class>
6374         <class id="mbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
6375                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6376                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6377                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6378                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6379                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6380                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6381                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6382                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6383                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6384                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6385                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6386                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6387                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6388                 </fields>
6389                 <links>
6390                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6391                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6392                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6393                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6394                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6395                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6396                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6397                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6398                 </links>
6399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6400                         <actions>
6401                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6402                                         <context link="usr" field="home_ou" />
6403                                 </retrieve>
6404                         </actions>
6405                 </permacrud>
6406         </class>
6407         <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">
6408                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6409                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6410                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6411                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6412                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6413                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6414                 </fields>
6415                 <links>
6416                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6417                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6418                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6419                 </links>
6420         </class>
6421         <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">
6422                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6423                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6424                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6425                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6426                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6427                 </fields>
6428                 <links>
6429                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6430                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6431                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6432                 </links>
6433         </class>
6434         <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">
6435                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6436                         <field name="bucket" reporter:datatype="link"/>
6437                         <field name="id" reporter:datatype="id" />
6438                         <field name="target_user" reporter:datatype="link"/>
6439                         <field name="create_time" reporter:datatype="timestamp" />
6440                         <field name="pos" reporter:datatype="int" />
6441                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6442                 </fields>
6443                 <links>
6444                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6445                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6446             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6447                 </links>
6448         </class>
6449         <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">
6450                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6451                         <field name="id" reporter:datatype="id" />
6452                         <field name="item" reporter:datatype="link"/>
6453                         <field name="note" reporter:datatype="text" />
6454                 </fields>
6455                 <links>
6456                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6457                 </links>
6458         </class>
6459         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6460                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6461                         <field name="balance_owed" reporter:datatype="money" />
6462                         <field name="total_owed" reporter:datatype="money" />
6463                         <field name="total_paid" reporter:datatype="money" />
6464                         <field name="usr" reporter:datatype="link"/>
6465                 </fields>
6466                 <links>
6467                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6468                 </links>
6469         </class>
6470         <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">
6471                 <fields oils_persist:primary="code" oils_persist:sequence="">
6472                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6473                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6474                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6475                 </fields>
6476                 <links/>
6477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6478             <actions>
6479                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6480                 <retrieve/>
6481                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6482                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6483             </actions>
6484         </permacrud>
6485         </class>
6486         <class id="mwp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6487                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6488                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6489                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6490                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6491                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6492                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6493                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6494                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6495                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6496                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6497                 </fields>
6498                 <links>
6499                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6500                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6501                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6502                 </links>
6503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6504             <actions>
6505                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6506                     <context link="xact" jump="usr" field="home_ou"/>
6507                 </retrieve>
6508                         </actions>
6509                 </permacrud>
6510         </class>
6511         <class id="mgp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6512                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6513                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6514                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6515                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6516                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6517                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6518                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6519                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6520                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6521                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6522                 </fields>
6523                 <links>
6524                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6525                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6526                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6527                 </links>
6528         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6529             <actions>
6530                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6531                     <context link="xact" jump="usr" field="home_ou"/>
6532                 </retrieve>
6533                         </actions>
6534                 </permacrud>
6535         </class>
6536         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6537                 <fields oils_persist:primary="id" oils_persist:sequence="">
6538                         <field name="checkin_lib" reporter:datatype="link"/>
6539                         <field name="checkin_staff" reporter:datatype="link"/>
6540                         <field name="checkin_time" reporter:datatype="timestamp"/>
6541                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6542                         <field name="circ_staff" reporter:datatype="link"/>
6543                         <field name="desk_renewal" reporter:datatype="bool"/>
6544                         <field name="due_date" reporter:datatype="timestamp"/>
6545                         <field name="duration" reporter:datatype="interval"/>
6546                         <field name="duration_rule" reporter:datatype="link"/>
6547                         <field name="fine_interval" reporter:datatype="interval"/>
6548                         <field name="id" reporter:datatype="id" />
6549                         <field name="max_fine" reporter:datatype="money" />
6550                         <field name="max_fine_rule" reporter:datatype="link"/>
6551                         <field name="opac_renewal" reporter:datatype="bool"/>
6552                         <field name="phone_renewal" reporter:datatype="bool"/>
6553                         <field name="recurring_fine" reporter:datatype="money" />
6554                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6555                         <field name="renewal_remaining" reporter:datatype="int" />
6556             <field name="grace_period" reporter:datatype="interval" />
6557                         <field name="stop_fines" reporter:datatype="text"/>
6558                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6559                         <field name="target_copy" reporter:datatype="link"/>
6560                         <field name="usr" reporter:datatype="link"/>
6561                         <field name="xact_finish" reporter:datatype="timestamp" />
6562                         <field name="xact_start" reporter:datatype="timestamp" />
6563                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6564                 </fields>
6565                 <links>
6566                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6567                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6568                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6569                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6570                 </links>
6571         </class>
6572         <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">
6573                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6574                         <field name="field" reporter:datatype="link"/>
6575                         <field name="id" reporter:datatype="id" />
6576                         <field name="source" reporter:datatype="link"/>
6577                         <field name="value" reporter:datatype="text"/>
6578                 </fields>
6579                 <links>
6580                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6581                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6582                 </links>
6583         </class>
6584         <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">
6585                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6586                         <field name="high" reporter:datatype="money" />
6587                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6588                         <field name="low" reporter:datatype="money" />
6589                         <field name="name" reporter:datatype="text"/>
6590                         <field name="normal" reporter:datatype="money" />
6591                         <field name="recurrence_interval" reporter:datatype="interval"/>
6592             <field name="grace_period" reporter:datatype="interval" />
6593                 </fields>
6594                 <links/>
6595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6596             <actions>
6597                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6598                 <retrieve/>
6599                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6600                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6601             </actions>
6602         </permacrud>
6603         </class>
6604         <class id="mckp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6605                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6606                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6607                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6608                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6609                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6610                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6611                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6612                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6613                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6614                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6615                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6616                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6617                 </fields>
6618                 <links>
6619                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6620                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6621                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6622                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6623                 </links>
6624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6625             <actions>
6626                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6627                     <context link="xact" jump="usr" field="home_ou"/>
6628                 </retrieve>
6629                         </actions>
6630                 </permacrud>
6631         </class>
6632         <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">
6633                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6634                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6635                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6636                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6637                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6638                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6639                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6640                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6641                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6642                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6643                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6644                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6645                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6646                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6647                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6648                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6649                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6650                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6651                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6652                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6653                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6654                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6655                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6656                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6657                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6658                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6659                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6660                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6661                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6662                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6663                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6664                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6665                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6666                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6667                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6668                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6669                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6670                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6671                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6672                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6673                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6674                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6675                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6676                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6677                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6678                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6679                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6680                 </fields>
6681                 <links>
6682                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6683                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6684                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6685                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6686                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6687                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6688                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6689                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6690                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6691                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6692                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6693                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6694                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6695                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6696                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6697                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6698                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6699                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6700                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6701                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6702                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6703                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6704                 </links>
6705         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6706             <actions>
6707                 <create permission="CREATE_COPY">
6708                     <context link="call_number" field="owning_lib"/>
6709                 </create>
6710                 <retrieve/>
6711                 <update permission="UPDATE_COPY">
6712                     <context link="call_number" field="owning_lib"/>
6713                 </update>
6714                 <delete permission="DELETE_COPY">
6715                     <context link="call_number" field="owning_lib"/>
6716                 </delete>
6717             </actions>
6718         </permacrud>
6719         </class>
6720
6721         <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">
6722                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6723                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6724                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6725                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6726                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6727                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6728                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6729                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6730                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6731                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6732                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6733                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6734                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6735                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6736                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6737                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6738                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6739                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6740                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6741                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6742                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6743                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6744                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6745                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6746                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6747                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6748                 </fields>
6749                 <links>
6750                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6751                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6752                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6753                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6754                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6755                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6756                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6757                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6758                 </links>
6759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6760                         <actions>
6761                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6762                                 <retrieve />
6763                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6764                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6765                         </actions>
6766                 </permacrud>
6767         </class>
6768
6769         <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">
6770                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6771                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6772                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6773                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6774                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6775                 </fields>
6776                 <links/>
6777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6778             <actions>
6779                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6780                 <retrieve/>
6781                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6782                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6783             </actions>
6784         </permacrud>
6785         </class>
6786         <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">
6787                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6788                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6789                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6790                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6791                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6792                 </fields>
6793                 <links/>
6794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6795             <actions>
6796                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6797                 <retrieve/>
6798                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6799                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6800             </actions>
6801         </permacrud>
6802         </class>
6803         <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">
6804                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6805                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6806                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6807                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6808                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6809                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6810                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6811                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6812                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6813                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6814                 </fields>
6815                 <links>
6816                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6817                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6818                 </links>
6819         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6820             <actions>
6821                 <create permission="CREATE_PERM" global_required="true"/>
6822                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6823                 <update permission="UPDATE_PERM" global_required="true"/>
6824                 <delete permission="DELETE_PERM" global_required="true"/>
6825             </actions>
6826         </permacrud>
6827         </class>
6828         <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">
6829                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6830                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6831                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6832                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6833                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6834                 </fields>
6835                 <links>
6836                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6837                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6838                 </links>
6839         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6840             <actions>
6841                 <create permission="ADMIN_SURVEY">
6842                     <context link="question" jump="survey" field="owner"/>
6843                 </create>
6844                 <retrieve/>
6845                 <update permission="ADMIN_SURVEY">
6846                     <context link="question" jump="survey" field="owner"/>
6847                 </update>
6848                 <delete permission="ADMIN_SURVEY">
6849                     <context link="question" jump="survey" field="owner"/>
6850                 </delete>
6851             </actions>
6852         </permacrud>
6853         </class>
6854         <class id="ancc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
6855                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6856                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6857                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6858                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6859                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6860                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6861                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6862                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6863                 </fields>
6864                 <links>
6865                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6866                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6867                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6868                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6869                 </links>
6870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6871                         <actions>
6872                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6873                         </actions>
6874                 </permacrud>
6875         </class>
6876         <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">
6877                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6878                         <field name="balance_owed" reporter:datatype="money" />
6879                         <field name="total_owed" reporter:datatype="money" />
6880                         <field name="total_paid" reporter:datatype="money" />
6881                         <field name="usr" reporter:datatype="link"/>
6882                 </fields>
6883                 <links>
6884                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6885                 </links>
6886         </class>
6887         <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">
6888                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6889                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6890                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6891                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6892                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6893                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6894                 </fields>
6895                 <links>
6896                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6897                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6898                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6899                 </links>
6900         </class>
6901         <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">
6902                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6903                         <field name="field" reporter:datatype="link"/>
6904                         <field name="id" reporter:datatype="id" />
6905                         <field name="source" reporter:datatype="link"/>
6906                         <field name="value" reporter:datatype="text"/>
6907                 </fields>
6908                 <links>
6909                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6910                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6911                 </links>
6912         </class>
6913         <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">
6914                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6915                         <field name="field" reporter:datatype="link"/>
6916                         <field name="id" reporter:datatype="id" />
6917                         <field name="source" reporter:datatype="link"/>
6918                         <field name="value" reporter:datatype="text"/>
6919                 </fields>
6920                 <links>
6921                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6922                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6923                 </links>
6924         </class>
6925         <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">
6926                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6927                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6928                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6929                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6930                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6931                 </fields>
6932                 <links>
6933                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6934                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6935                 </links>
6936         </class>
6937         <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">
6938                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6939                         <field name="depth" reporter:datatype="int" />
6940                         <field name="grantable" reporter:datatype="bool"/>
6941                         <field name="grp" reporter:datatype="link"/>
6942                         <field name="id" reporter:datatype="id" />
6943                         <field name="perm" reporter:datatype="link"/>
6944                 </fields>
6945                 <links>
6946                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6947                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6948                 </links>
6949         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6950             <actions>
6951                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6952                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6953                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6954                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6955             </actions>
6956         </permacrud>
6957         </class>
6958         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6959                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6960                         <field name="items" oils_persist:virtual="true" />
6961                         <field name="btype" reporter:datatype="text"/>
6962                         <field name="id" reporter:datatype="id" />
6963                         <field name="name" reporter:datatype="text"/>
6964                         <field name="description" reporter:datatype="text"/>
6965                         <field name="owner" reporter:datatype="link"/>
6966                         <field name="pub" reporter:datatype="bool"/>
6967                         <field name="create_time" reporter:datatype="timestamp" />
6968                 </fields>
6969                 <links>
6970                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6971                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6972                 </links>
6973         </class>
6974         <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">
6975                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6976                         <field name="id" reporter:datatype="id" />
6977                         <field name="bucket" reporter:datatype="link"/>
6978                         <field name="note" reporter:datatype="text" />
6979                 </fields>
6980                 <links>
6981                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6982                 </links>
6983         </class>
6984         <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">
6985                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6986                         <field name="id" reporter:datatype="int" />
6987                         <field name="usr" reporter:datatype="link"/>
6988                         <field name="work_ou" reporter:datatype="link"/>
6989                 </fields>
6990                 <links>
6991                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6992                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6993                 </links>
6994         </class>
6995         <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">
6996                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6997                         <field name="depth" reporter:datatype="int"/>
6998                         <field name="grantable" reporter:datatype="bool"/>
6999                         <field name="id" reporter:datatype="id" />
7000                         <field name="perm" reporter:datatype="link"/>
7001                         <field name="usr" reporter:datatype="link"/>
7002                 </fields>
7003                 <links>
7004                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7005                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7006                 </links>
7007         </class>
7008         <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">
7009                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7010                         <field name="object_id" reporter:datatype="text"/>
7011                         <field name="grantable" reporter:datatype="bool"/>
7012                         <field name="id" reporter:datatype="id" />
7013                         <field name="perm" reporter:datatype="link"/>
7014                         <field name="usr" reporter:datatype="link"/>
7015                         <field name="object_type" reporter:datatype="text"/>
7016                 </fields>
7017                 <links>
7018                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7019                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7020                 </links>
7021         </class>
7022         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
7023                 <fields oils_persist:primary="id" oils_persist:sequence="">
7024                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7025                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7026                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7027                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7028                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7029                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7030                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7031                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7032                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7033                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7034                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7035                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7036                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7037                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7038                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7039                 </fields>
7040                 <links>
7041                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7042                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7043                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7044                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7045                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7046                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7047                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7048                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7049                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7050                 </links>
7051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7052             <actions>
7053                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7054                     <context link="xact" jump="usr" field="home_ou"/>
7055                 </retrieve>
7056                         </actions>
7057                 </permacrud>
7058         </class>
7059         <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">
7060                 <fields oils_persist:primary="id" oils_persist:sequence="">
7061                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7062                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7063                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7064                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7065                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7066                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7067                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7068                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7069                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7070                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7071                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7072                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7073                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7074                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7075                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7076                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7077                 </fields>
7078                 <links>
7079                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7080                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7081                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7082                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7083                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7084                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7085                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7086                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7087                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7088                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7089                 </links>
7090         </class>
7091         <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">
7092                 <fields oils_persist:primary="id" oils_persist:sequence="">
7093                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7094                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7095                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7096                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7097                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7098                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7099                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7100                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7101                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7102                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7103                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7104                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7105                 </fields>
7106                 <links>
7107                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7108                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7109                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7110                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7111                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7112                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7113                 </links>
7114         </class>
7115         <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">
7116                 <fields oils_persist:primary="id" oils_persist:sequence="">
7117                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7118                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7119                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7120                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7121                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7122                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7123                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7124                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7125                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7126                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7127                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7128                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7129                 </fields>
7130                 <links>
7131                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7132                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7133                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7134                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7135                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7136                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7137                 </links>
7138         </class>
7139         <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">
7140                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7141                         <field name="bucket" reporter:datatype="link"/>
7142                         <field name="id" reporter:datatype="id" />
7143                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7144                         <field name="create_time" reporter:datatype="timestamp" />
7145                         <field name="pos" reporter:datatype="int" />
7146                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7147                 </fields>
7148                 <links>
7149                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7150                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7151             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7152                 </links>
7153         </class>
7154         <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">
7155                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7156                         <field name="id" reporter:datatype="id" />
7157                         <field name="item" reporter:datatype="link"/>
7158                         <field name="note" reporter:datatype="text" />
7159                 </fields>
7160                 <links>
7161                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7162                 </links>
7163         </class>
7164         <class id="asce" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
7165                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7166                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7167                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7168                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7169                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7170                 </fields>
7171                 <links>
7172                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7173                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7174                 </links>
7175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7176                         <actions>
7177                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7178                         </actions>
7179                 </permacrud>
7180         </class>
7181     <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">
7182         <fields oils_persist:primary="field">
7183             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7184             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7185             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7186         </fields>
7187         <links/>
7188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7189             <actions>
7190                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7191                 <retrieve />
7192                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7193                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7194             </actions>
7195         </permacrud>
7196     </class>
7197         <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">
7198                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7199                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7200                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7201                 </fields>
7202                 <links/>
7203         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7204             <actions>
7205                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7206                 <retrieve/>
7207                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7208                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7209             </actions>
7210         </permacrud>
7211         </class>
7212
7213
7214         <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">
7215                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7216                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7217                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7218                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7219                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7220                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7221                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7222                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7223                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7224                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7225                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7226                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7227                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7228                 </fields>
7229                 <links>
7230                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7231                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7232                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7233                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7234                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7235                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7236                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7237                 </links>
7238         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7239             <actions>
7240                 <create permission="TRANSIT_COPY">
7241                     <context link="target_copy" field="owner"/>
7242                 </create>
7243                 <retrieve/>
7244                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7245                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7246             </actions>
7247         </permacrud>
7248         </class>
7249         <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">
7250                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7251                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7252                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7253                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7254                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7255                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7256                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7257                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7258                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7259                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7260                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7261                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7262                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7263                 </fields>
7264                 <links>
7265                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7266                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7267                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7268                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7269                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7270                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7271                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7272                 </links>
7273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7274             <actions>
7275                 <create permission="TRANSIT_COPY" context_field="owner">
7276                     <context link="target_copy" field="circ_lib"/>
7277                 </create>
7278                 <retrieve/>
7279                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7280                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7281             </actions>
7282         </permacrud>
7283         </class>
7284         <class id="mb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
7285                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7286                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7287                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7288                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7289                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7290                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7291                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7292                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7293                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7294                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7295                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7296                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7297                 </fields>
7298                 <links>
7299                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7300                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7301                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7302                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7303                 </links>
7304         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7305             <actions>
7306                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7307                     <context link="xact" jump="usr" field="home_ou"/>
7308                 </retrieve>
7309                         </actions>
7310                 </permacrud>
7311         </class>
7312         <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">
7313                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7314                         <field name="grp" />
7315                         <field name="id" reporter:datatype="id" />
7316                         <field name="usr" />
7317                 </fields>
7318                 <links>
7319                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7320                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7321                 </links>
7322         </class>
7323         <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">
7324                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7325                         <field name="id" reporter:datatype="id" />
7326                         <field name="fq_field" reporter:datatype="text"/>
7327                         <field name="identity_value" reporter:datatype="text"/>
7328                         <field name="translation" reporter:datatype="text"/>
7329                         <field name="string" reporter:datatype="text"/>
7330                 </fields>
7331                 <links>
7332                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7333                 </links>
7334         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7335             <actions>
7336                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7337                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7338                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7339                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7340             </actions>
7341         </permacrud>
7342         </class>
7343         <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">
7344                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7345                         <field name="id" reporter:datatype="id" />
7346                         <field name="fm_class" reporter:datatype="text"/>
7347                         <field name="field" reporter:datatype="text"/>
7348                         <field name="owner" reporter:datatype="org_unit"/>
7349                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7350                 </fields>
7351                 <links>
7352                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7353                 </links>
7354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7355             <actions>
7356                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7357                 <retrieve/>
7358                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7359                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7360             </actions>
7361         </permacrud>
7362         </class>
7363         <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">
7364                 <fields oils_persist:primary="code">
7365                         <field name="code" reporter:datatype="id" />
7366                         <field name="marc_code" reporter:datatype="text"/>
7367                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7368                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7369                 </fields>
7370                 <links/>
7371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7372             <actions>
7373                 <create permission="CREATE_LOCALE" global_required="true"/>
7374                 <retrieve/>
7375                 <update permission="UPDATE_LOCALE" global_required="true"/>
7376                 <delete permission="DELETE_LOCALE" global_required="true"/>
7377             </actions>
7378         </permacrud>
7379         </class>
7380         <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">
7381                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7382                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7383                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7384                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7385             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7386                 </fields>
7387                 <links>
7388                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7389                 </links>
7390         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7391             <actions>
7392                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7393                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7394                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7395                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7396             </actions>
7397         </permacrud>
7398         </class>
7399
7400         <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">
7401                 <fields oils_persist:primary="id">
7402                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7403                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7404                 </fields>
7405                 <links/>
7406         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7407             <actions>
7408                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7409                 <retrieve/>
7410                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7411                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7412             </actions>
7413         </permacrud>
7414         </class>
7415
7416         <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">
7417                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7418                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7419                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7420                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7421                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7422                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7423                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7424                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7425                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7426                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7427                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7428                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7429                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7430                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7431                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7432                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7433                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7434                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7435                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7436                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7437                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7438                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7439                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7440                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7441                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7442                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7443                 </fields>
7444                 <links>
7445                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7446                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7447                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7448                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7449                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7450                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7451                 </links>
7452         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7453             <actions>
7454                 <create permission="user_request.create">
7455                     <context link="usr" field="home_ou"/>
7456                                 </create>
7457                 <retrieve permission="user_request.view">
7458                     <context link="usr" field="home_ou"/>
7459                                 </retrieve>
7460                 <update permission="user_request.update">
7461                     <context link="usr" field="home_ou"/>
7462                                 </update>
7463                 <delete permission="user_request.delete">
7464                     <context link="usr" field="home_ou"/>
7465                                 </delete>
7466             </actions>
7467         </permacrud>
7468         </class>
7469
7470         <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">
7471                 <fields oils_persist:primary="code">
7472                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7473                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7474                 </fields>
7475                 <links/>
7476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7477             <actions>
7478                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7479                 <retrieve/>
7480                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7481                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7482             </actions>
7483         </permacrud>
7484         </class>
7485
7486         <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">
7487                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7488                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7489                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7490                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7491                         <field reporter:label="Ratio" name="ratio" />
7492                 </fields>
7493                 <links>
7494                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7495                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7496                 </links>
7497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7498                         <actions>
7499                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7500                                 <retrieve/>
7501                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7502                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7503                         </actions>
7504                 </permacrud>
7505         </class>
7506
7507         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7508                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7509                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7510                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7511                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7512                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7513                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7514                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7515                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7516                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7517                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7518                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7519                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7520                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7521                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7522                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7523                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7524                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7525                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7526                 </fields>
7527                 <links>
7528                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7529                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7530             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7531             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7532             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7533                 </links>
7534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7535             <actions>
7536                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7537                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7538                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7539                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7540             </actions>
7541         </permacrud>
7542         </class>
7543
7544         <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">
7545                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7546                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7547                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7548                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7549                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7550                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7551                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7552                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7553                 </fields>
7554                 <links>
7555                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7556                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7557                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7558                 </links>
7559         </class>
7560
7561         <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">
7562                 <fields oils_persist:primary="code">
7563                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7564                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7565                 </fields>
7566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7567             <actions>
7568                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7569                 <retrieve/>
7570                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7571                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7572             </actions>
7573                 </permacrud>
7574         </class>
7575
7576         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7577                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7578                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7579                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7580                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7581                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7582                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7583                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7584                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7585                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7586                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7587                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7588                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7589                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7590                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7591                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7592                 </fields>
7593                 <links>
7594                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7595                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7596                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7597                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7598                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7599                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7600                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7601                 </links>
7602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7603             <actions>
7604                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7605                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7606                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7607                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7608             </actions>
7609         </permacrud>
7610         </class>
7611
7612         <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">
7613                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7614                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7615                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7616                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7617                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7618                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7619                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7620                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7621                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7622                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7623                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7624                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7625                 </fields>
7626                 <links>
7627                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7628                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7629                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7630                 </links>
7631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7632             <actions>
7633                 <create   permission="ADMIN_INVOICE">
7634                                         <context link="invoice" field="receiver"/>
7635                                 </create>
7636                 <retrieve permission="ADMIN_INVOICE">
7637                                         <context link="invoice" field="receiver"/>
7638                                 </retrieve>
7639                 <update   permission="ADMIN_INVOICE">
7640                                         <context link="invoice" field="receiver"/>
7641                                 </update>
7642                                 <delete   permission="ADMIN_INVOICE">
7643                                         <context link="invoice" field="receiver"/>
7644                                 </delete>
7645             </actions>
7646         </permacrud>
7647         </class>
7648
7649         <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">
7650                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7651                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7652                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7653                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7654                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7655                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7656                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7657                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7658                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7659                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7660                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7661                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7662                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7663                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7664                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7665                 </fields>
7666                 <links>
7667                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7668                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7669                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7670                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7671                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7672                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7673                 </links>
7674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7675             <actions>
7676                 <create   permission="ADMIN_INVOICE">
7677                                         <context link="invoice" field="receiver"/>
7678                                 </create>
7679                 <retrieve permission="ADMIN_INVOICE">
7680                                         <context link="invoice" field="receiver"/>
7681                                 </retrieve>
7682                 <update   permission="ADMIN_INVOICE">
7683                                         <context link="invoice" field="receiver"/>
7684                                 </update>
7685                                 <delete   permission="ADMIN_INVOICE">
7686                                         <context link="invoice" field="receiver"/>
7687                                 </delete>
7688             </actions>
7689         </permacrud>
7690         </class>
7691
7692         <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">
7693                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7694                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7695                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7696                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7697                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7698                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7699                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7700                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7701                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7702                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7703                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7704                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7705                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7706                 </fields>
7707                 <links>
7708                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7709                 </links>
7710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7711             <actions>
7712                 <create permission="ADMIN_PROVIDER">
7713                     <context link="provider" field="owner"/>
7714                 </create>
7715                 <retrieve permission="ADMIN_PROVIDER">
7716                     <context link="provider" field="owner"/>
7717                 </retrieve>
7718                 <update permission="ADMIN_PROVIDER">
7719                     <context link="provider" field="owner"/>
7720                 </update>
7721                 <delete permission="ADMIN_PROVIDER">
7722                     <context link="provider" field="owner"/>
7723                 </delete>
7724             </actions>
7725         </permacrud>
7726         </class>
7727
7728         <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">
7729                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7730                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7731                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7732                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7733                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7734                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7735                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7736         </fields>
7737                 <links>
7738                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7739                 </links>
7740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7741             <actions>
7742                 <create permission="ADMIN_PROVIDER">
7743                     <context link="provider" field="owner"/>
7744                 </create>
7745                 <retrieve permission="ADMIN_PROVIDER">
7746                     <context link="provider" field="owner"/>
7747                 </retrieve>
7748                 <update permission="ADMIN_PROVIDER">
7749                     <context link="provider" field="owner"/>
7750                 </update>
7751                 <delete permission="ADMIN_PROVIDER">
7752                     <context link="provider" field="owner"/>
7753                 </delete>
7754             </actions>
7755         </permacrud>
7756     </class>
7757         <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">
7758                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7759                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7760                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7761                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7762                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7763                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7764                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7765                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7766                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7767                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7768                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7769                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7770                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7771                 </fields>
7772                 <links>
7773                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7774                 </links>
7775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7776             <actions>
7777                 <create permission="ADMIN_PROVIDER">
7778                     <context link="contact" jump='provider' field="owner"/>
7779                 </create>
7780                 <retrieve permission="ADMIN_PROVIDER">
7781                     <context link="contact" jump='provider' field="owner"/>
7782                 </retrieve>
7783                 <update permission="ADMIN_PROVIDER">
7784                     <context link="contact" jump='provider' field="owner"/>
7785                 </update>
7786                 <delete permission="ADMIN_PROVIDER">
7787                     <context link="contact" jump='provider' field="owner"/>
7788                 </delete>
7789             </actions>
7790         </permacrud>
7791         </class>
7792
7793         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7794                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7795                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7796                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7797                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7798                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7799                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7800                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7801                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7802                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7803                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7804                 </fields>
7805                 <links>
7806                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7807                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7808                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7809                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7810                 </links>
7811         </class>
7812
7813         <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">
7814                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7815                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7816                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7817                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7818                 </fields>
7819                 <links>
7820             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7821                 </links>
7822                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7823                         <actions>
7824                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7825                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7826                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7827                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7828                         </actions>
7829                 </permacrud>
7830         </class>
7831
7832         <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">
7833                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7834                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7835                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7836                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7837                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7838                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7839                 </fields>
7840                 <links>
7841                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7842                 </links>
7843                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7844                         <actions>
7845                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7846                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7847                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7848                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7849                         </actions>
7850                 </permacrud>
7851         </class>
7852
7853         <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">
7854                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7855                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7856                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7857                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7858                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7859                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7860                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7861                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7862                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7863                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7864                 </fields>
7865                 <links>
7866                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7867                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7868             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7869             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7870                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7871                 </links>
7872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7873             <actions>
7874                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7875                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7876                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7877                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7878             </actions>
7879         </permacrud>
7880         </class>
7881
7882         <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">
7883                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7884                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7885                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7886                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7887                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7888                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7889                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7890                 </fields>
7891                 <links>
7892                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7893                 </links>
7894                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7895                         <actions>
7896                                 <create permission="ADMIN_FUNDING_SOURCE">
7897                     <context link="funding_source" field="owner"/>
7898                 </create>
7899                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7900                     <context link="funding_source" field="owner"/>
7901                 </retrieve>
7902                                 <update permission="ADMIN_FUNDING_SOURCE">
7903                     <context link="funding_source" field="owner"/>
7904                 </update>
7905                                 <delete permission="ADMIN_FUNDING_SOURCE">
7906                     <context link="funding_source" field="owner"/>
7907                 </delete>
7908                         </actions>
7909                 </permacrud>
7910         </class>
7911
7912         <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">
7913                 <fields oils_persist:primary="id">
7914                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7915                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7916                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7917                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7918                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7919                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7920                 </fields>
7921                 <links>
7922                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7923                 </links>
7924         </class>
7925
7926         <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">
7927                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7928                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7929                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7930                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7931                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7932                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7933                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7934                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7935                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7936                 </fields>
7937                 <links>
7938                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7939                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7940                 </links>
7941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7942                         <actions>
7943                                 <create permission="ADMIN_ACQ_FUND">
7944                     <context link="fund" field="org"/>
7945                 </create>
7946                                 <retrieve permission="ADMIN_ACQ_FUND">
7947                     <context link="fund" field="org"/>
7948                 </retrieve>
7949                                 <update permission="ADMIN_ACQ_FUND">
7950                     <context link="fund" field="org"/>
7951                 </update>
7952                                 <delete permission="ADMIN_ACQ_FUND">
7953                     <context link="fund" field="org"/>
7954                 </delete>
7955                         </actions>
7956                 </permacrud>
7957         </class>
7958
7959         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7960                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7961                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7962                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7963                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7964                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7965                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7966                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7967                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7968                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7969                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7970                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7971                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7972                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7973                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7974                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7975                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7976                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7977                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7978                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7979                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7980                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7981                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7982                 </fields>
7983                 <links>
7984                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7985                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7986             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7987             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7988             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7989             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7990             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7991             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7992             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7993             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7994             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7995                 </links>
7996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
7997             <actions>
7998                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7999                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8000                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8001                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8002             </actions>
8003         </permacrud>
8004         </class>
8005
8006         <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">
8007                 <fields oils_persist:primary="fund">
8008                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8009                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8010                 </fields>
8011                 <links>
8012                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8013                 </links>
8014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8015             <actions>
8016                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8017                                         <context link="fund" field="org" />
8018                 </retrieve>
8019             </actions>
8020         </permacrud>
8021         </class>
8022
8023         <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">
8024                 <fields oils_persist:primary="fund">
8025                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8026                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8027                 </fields>
8028                 <links>
8029                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8030                 </links>
8031         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8032             <actions>
8033                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8034                                         <context link="fund" field="org" />
8035                 </retrieve>
8036             </actions>
8037         </permacrud>
8038         </class>
8039
8040         <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">
8041                 <fields oils_persist:primary="fund">
8042                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8043                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8044                 </fields>
8045                 <links>
8046                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8047                 </links>
8048         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8049             <actions>
8050                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8051                                         <context link="fund" field="org" />
8052                 </retrieve>
8053             </actions>
8054         </permacrud>
8055         </class>
8056
8057         <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">
8058                 <fields oils_persist:primary="fund">
8059                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8060                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8061                 </fields>
8062                 <links>
8063                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8064                 </links>
8065         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8066             <actions>
8067                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8068                                         <context link="fund" field="org" />
8069                 </retrieve>
8070             </actions>
8071         </permacrud>
8072         </class>
8073
8074         <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">
8075                 <fields oils_persist:primary="fund">
8076                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8077                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8078                 </fields>
8079                 <links>
8080                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8081                 </links>
8082         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8083             <actions>
8084                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8085                                         <context link="fund" field="org" />
8086                 </retrieve>
8087             </actions>
8088         </permacrud>
8089         </class>
8090
8091    <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">
8092         <fields oils_persist:primary="fund">
8093             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8094             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8095         </fields>
8096         <links>
8097             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8098         </links>
8099     </class>
8100
8101    <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">
8102         <fields oils_persist:primary="fund">
8103             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8104             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8105         </fields>
8106         <links>
8107             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8108         </links>
8109     </class>
8110
8111    <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">
8112         <fields oils_persist:primary="fund">
8113             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8114             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8115         </fields>
8116         <links>
8117             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8118         </links>
8119     </class>
8120
8121    <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">
8122         <fields oils_persist:primary="fund">
8123             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8124             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8125         </fields>
8126         <links>
8127             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8128         </links>
8129     </class>
8130
8131    <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">
8132         <fields oils_persist:primary="fund">
8133             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8134             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8135         </fields>
8136         <links>
8137             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8138         </links>
8139     </class>
8140
8141         <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">
8142                 <fields oils_persist:primary="funding_source">
8143                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8144                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8145                 </fields>
8146                 <links>
8147                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8148                 </links>
8149         </class>
8150
8151         <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">
8152                 <fields oils_persist:primary="funding_source">
8153                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8154                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8155                 </fields>
8156                 <links>
8157                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8158                 </links>
8159         </class>
8160
8161         <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">
8162                 <fields oils_persist:primary="funding_source">
8163                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8164                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8165                 </fields>
8166                 <links>
8167                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8168                 </links>
8169         </class>
8170
8171         <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">
8172                 <fields oils_persist:primary="fund">
8173                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8174                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8175                 </fields>
8176                 <links>
8177                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8178                 </links>
8179         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8180             <actions>
8181                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8182                                         <context link="fund" field="org" />
8183                 </retrieve>
8184             </actions>
8185         </permacrud>
8186     </class>
8187     <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">
8188         <oils_persist:source_definition><![CDATA[
8189             SELECT
8190                 acqf.*,
8191                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8192                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8193                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8194                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8195             FROM
8196                 acq.fund acqf
8197                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8198                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8199                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8200                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8201         ]]></oils_persist:source_definition>
8202         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8203             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8204             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8205             <field reporter:label="Name" name="name" reporter:datatype="text" />
8206             <field reporter:label="Year" name="year" reporter:datatype="int" />
8207             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8208             <field reporter:label="Code" name="code" reporter:datatype="text" />
8209             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8210             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8211             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8212             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8213             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8214
8215             <!-- non fund-native fields -->
8216             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8217             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8218             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8219             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8220         </fields>
8221         <links>
8222             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8223             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8224             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8225         </links>
8226         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8227             <actions>
8228                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8229             </actions>
8230         </permacrud>
8231         </class>
8232         <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">
8233                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8234                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8235                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8236                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8237                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8238                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8239                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8240                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8241                 </fields>
8242                 <links>
8243                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8244                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8245                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8246                 </links>
8247                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8248                         <actions>
8249                                 <create permission="ADMIN_ACQ_FUND">
8250                     <context link="fund" field="org"/>
8251                 </create>
8252                                 <retrieve permission="ADMIN_ACQ_FUND">
8253                     <context link="fund" field="org"/>
8254                 </retrieve>
8255                                 <update permission="ADMIN_ACQ_FUND">
8256                     <context link="fund" field="org"/>
8257                 </update>
8258                                 <delete permission="ADMIN_ACQ_FUND">
8259                     <context link="fund" field="org"/>
8260                 </delete>
8261                         </actions>
8262                 </permacrud>
8263         </class>
8264
8265     <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">
8266         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8267             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8268             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8269             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8270             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8271             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8272             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8273             <field reporter:label="Note" name="note" reporter:datatype="text" />
8274             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8275         </fields>
8276         <links>
8277             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8278             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8279             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8280         </links>
8281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8282                         <actions>
8283                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8284                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8285                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8286                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8287                         </actions>
8288                 </permacrud>
8289     </class>
8290
8291         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8292                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8293                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8294                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8295                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8296                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8297                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8298                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8299                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8300                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8301                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8302                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8303                 </fields>
8304                 <links>
8305                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8306                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8307                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8308                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8309                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8310                 </links>
8311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8312                         <actions>
8313                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8314                         </actions>
8315                 </permacrud>
8316         </class>
8317
8318         <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">
8319                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8320                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8321                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8322                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8323                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8324                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8325                 </fields>
8326                 <links>
8327                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8328                 </links>
8329                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8330                         <actions>
8331                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8332                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8333                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8334                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8335                         </actions>
8336                 </permacrud>
8337         </class>
8338
8339         <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">
8340                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8341                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8342                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8343                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8344                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8345                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8346                         <field reporter:label="State" name="state" reporter:datatype="text" />
8347                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8348                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8349                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8350                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8351                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8352                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8353                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8354                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8355                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8356                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8357                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8358                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8359                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8360                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8361                 </fields>
8362                 <links>
8363                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8364                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8365                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8366                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8367                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8368                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8369                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8370                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8371                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8372                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8373                 </links>
8374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8375                         <actions>
8376                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8377                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8378                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8379                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8380                         </actions>
8381                 </permacrud>
8382         </class>
8383
8384         <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">
8385                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8386                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8387                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8388                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8389                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8390                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8391                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8392                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8393                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8394                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8395                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8396                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8397                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8398                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8399                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8400                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8401                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8402                 </fields>
8403                 <links>
8404                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8405                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8406                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8407                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8408                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8409                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8410                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8411                 </links>
8412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8413             <actions>
8414                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8415             </actions>
8416                 </permacrud>
8417         </class>
8418
8419         <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">
8420                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8421                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8422                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8423                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8424                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8425                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8426                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8427                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8428                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8429                 </fields>
8430                 <links>
8431                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8432                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8433                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8434                 </links>
8435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8436             <actions>
8437                 <create permission="CREATE_PURCHASE_ORDER">
8438                     <context link="purchase_order" field="ordering_agency"/>
8439                 </create>
8440                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8441                     <context link="purchase_order" field="ordering_agency"/>
8442                 </retrieve>
8443                 <update permission="CREATE_PURCHASE_ORDER">
8444                     <context link="purchase_order" field="ordering_agency"/>
8445                 </update>
8446                 <delete permission="CREATE_PURCHASE_ORDER">
8447                     <context link="purchase_order" field="ordering_agency"/>
8448                 </delete>
8449             </actions>
8450                 </permacrud>
8451         </class>
8452
8453         <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">
8454                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8455                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8456                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8457                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8458                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8459                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8460                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8461                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8462                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8463                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8464                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8465                 </fields>
8466                 <links>
8467                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8468                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8469                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8470                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8471                 </links>
8472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8473             <actions>
8474                 <create permission="CREATE_PURCHASE_ORDER">
8475                     <context link="purchase_order" field="ordering_agency"/>
8476                 </create>
8477                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8478                     <context link="purchase_order" field="ordering_agency"/>
8479                 </retrieve>
8480                 <update permission="CREATE_PURCHASE_ORDER">
8481                     <context link="purchase_order" field="ordering_agency"/>
8482                 </update>
8483                 <delete permission="CREATE_PURCHASE_ORDER">
8484                     <context link="purchase_order" field="ordering_agency"/>
8485                 </delete>
8486             </actions>
8487                 </permacrud>
8488         </class>
8489
8490         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8491                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8492                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8493                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8494                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8495                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8496                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8497                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8498                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8499                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8500                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8501                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8502                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8503                         <field reporter:label="State" name="state" reporter:datatype="text" />
8504                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8505                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8506                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8507                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8508                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8509                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8510                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8511                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8512                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8513                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8514                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8515                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8516                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8517                 </fields>
8518                 <links>
8519                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8520                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8521                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8522                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8523                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8524                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8525                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8526                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8527                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8528                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8529                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8530                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8531                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8532                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8533                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8534                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8535                 </links>
8536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8537                         <actions>
8538                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8539                                         <context link="purchase_order" field="ordering_agency"/>
8540                                         <context link="picklist" field="org_unit"/>
8541                                 </retrieve>
8542                         </actions>
8543                 </permacrud>
8544         </class>
8545
8546         <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">
8547                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8548                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8549                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8550                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8551                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8552                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8553                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8554                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8555                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8556                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8557                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8558                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8559                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8560                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8561                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8562                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8563                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8564                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8565                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8566                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8567                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8568                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8569                 </fields>
8570                 <links>
8571                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8572                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8573                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8574                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8575                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8576                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8577                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8578                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8579                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8580                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8581                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8582                 </links>
8583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8584                         <actions>
8585                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8586                                         <context link="purchase_order" field="ordering_agency"/>
8587                                         <context link="picklist" field="org_unit"/>
8588                                 </retrieve>
8589                         </actions>
8590                 </permacrud>
8591         </class>
8592
8593         <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">
8594                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8595                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8596                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8597                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8598                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8599                 </fields>
8600                 <links>
8601                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8602                 </links>
8603                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8604                         <actions>
8605                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8606                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8607                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8608                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8609                         </actions>
8610                 </permacrud>
8611         </class>
8612
8613         <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">
8614                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8615                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8616                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8617                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8618                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8619                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8620                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8621                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8622                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8623                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8624                 </fields>
8625                 <links>
8626                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8627                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8628                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8629                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8630                 </links>
8631         </class>
8632
8633         <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">
8634                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8635                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8636                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8637                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8638                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8639                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8640                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8641                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8642                 </fields>
8643                 <links>
8644                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8645                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8646                 </links>
8647         </class>
8648
8649         <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">
8650                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8651                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8652                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8653                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8654                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8655                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8656                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8657                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8658                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8659                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8660                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8661                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8662                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8663                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8664                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8665                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8666                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8667                 </fields>
8668                 <links>
8669                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8670                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8671                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8672                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8673                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8674                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8675                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8676                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8677                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8678                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8679                 </links>
8680         </class>
8681
8682         <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">
8683                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8684                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8685                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8686                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8687                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8688                 </fields>
8689                 <links/>
8690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8691                         <actions>
8692                                 <retrieve />
8693                         </actions>
8694                 </permacrud>
8695         </class>
8696
8697         <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">
8698                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8699                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8700                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8701                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8702                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8703                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8704             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8705                 </fields>
8706                 <links/>
8707         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8708             <actions>
8709                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8710                 <retrieve />
8711                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8712                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8713             </actions>
8714         </permacrud>
8715         </class>
8716
8717         <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">
8718                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8719                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8720                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8721                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8722                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8723                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8724                 </fields>
8725                 <links/>
8726         </class>
8727         <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">
8728                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8729                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8730                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8731                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8732                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8733                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8734                 </fields>
8735                 <links>
8736                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8737                 </links>
8738         </class>
8739
8740         <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">
8741             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8742                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8743                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8744                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8745                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8746                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8747                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8748         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8749
8750             </fields>
8751             <links>
8752                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8753             </links>
8754             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8755                 <actions>
8756                     <create permission="ADMIN_PROVIDER">
8757                         <context link="provider" field="owner"/>
8758                     </create>
8759                     <retrieve permission="ADMIN_PROVIDER">
8760                         <context link="provider" field="owner"/>
8761                     </retrieve>
8762                     <update permission="ADMIN_PROVIDER">
8763                         <context link="provider" field="owner"/>
8764                     </update>
8765                     <delete permission="ADMIN_PROVIDER">
8766                         <context link="provider" field="owner"/>
8767                     </delete>
8768                 </actions>
8769             </permacrud>
8770         </class>
8771         
8772         <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">
8773             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8774                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8775                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8776                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8777                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8778             </fields>
8779             <links>
8780                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8781             </links>
8782             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8783                 <actions>
8784                     <create permission="ADMIN_PROVIDER">
8785                         <context link="provider" field="owner"/>
8786                     </create>
8787                     <retrieve permission="ADMIN_PROVIDER">
8788                         <context link="provider" field="owner"/>
8789                     </retrieve>
8790                     <update permission="ADMIN_PROVIDER">
8791                         <context link="provider" field="owner"/>
8792                     </update>
8793                     <delete permission="ADMIN_PROVIDER">
8794                         <context link="provider" field="owner"/>
8795                     </delete>
8796                 </actions>
8797             </permacrud>
8798         </class>
8799         
8800         <class id="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">
8801             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8802                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8803                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8804                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8805                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8806                 </fields>
8807                 <links/>
8808         </class>
8809
8810         <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">
8811                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8812                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8813                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8814                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8815                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8816                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8817                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8818                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8819                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8820                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8821                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8822                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8823                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8824                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8825                 </fields>
8826                 <links>
8827                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8828                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8829                 </links>
8830         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8831             <actions>
8832                 <create permission="ADMIN_PROVIDER">
8833                     <context link="provider" field="owner"/>
8834                 </create>
8835                 <retrieve permission="ADMIN_PROVIDER">
8836                     <context link="provider" field="owner"/>
8837                 </retrieve>
8838                 <update permission="ADMIN_PROVIDER">
8839                     <context link="provider" field="owner"/>
8840                 </update>
8841                 <delete permission="ADMIN_PROVIDER">
8842                     <context link="provider" field="owner"/>
8843                 </delete>
8844             </actions>
8845         </permacrud>
8846         </class>
8847
8848         <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">
8849                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8850                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8851                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8852                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8853                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8854                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8855                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8856                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8857                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8858                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8859                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8860                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8861                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8862                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8863                 </fields>
8864                 <links>
8865                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8866                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8867                 </links>
8868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8869             <actions>
8870                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8871                     <context link="account" jump="provider" field="owner"/>
8872                 </retrieve>
8873                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8874                     <context link="account" jump="provider" field="owner"/>
8875                 </update>
8876                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8877                     <context link="account" jump="provider" field="owner"/>
8878                 </delete>
8879             </actions>
8880         </permacrud>
8881         </class>
8882
8883
8884         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8885                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8886                         <field name="id" reporter:datatype="id" />
8887                         <field name="parent" reporter:datatype="link"/>
8888                         <field name="owner" reporter:datatype="link"/>
8889                         <field name="create_time" reporter:datatype="timestamp"/>
8890                         <field name="name" reporter:datatype="text"/>
8891                         <field name="shared" reporter:datatype="bool"/>
8892                         <field name="share_with" reporter:datatype="link"/>
8893                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8894                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8895                 </fields>
8896                 <links>
8897                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8898                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8899                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8900                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8901                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8902                 </links>
8903         </class>
8904         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8905                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8906                         <field name="id" reporter:datatype="id" />
8907                         <field name="parent" reporter:datatype="link"/>
8908                         <field name="owner" reporter:datatype="link"/>
8909                         <field name="create_time" reporter:datatype="timestamp"/>
8910                         <field name="name" reporter:datatype="text"/>
8911                         <field name="shared" reporter:datatype="bool"/>
8912                         <field name="share_with" reporter:datatype="link"/>
8913                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8914                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8915                 </fields>
8916                 <links>
8917                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8918                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8919                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8920                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8921                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8922                 </links>
8923         </class>
8924         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8925                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8926                         <field name="id" reporter:datatype="id" />
8927                         <field name="parent" reporter:datatype="link"/>
8928                         <field name="owner" reporter:datatype="link"/>
8929                         <field name="create_time" reporter:datatype="timestamp"/>
8930                         <field name="name" reporter:datatype="text"/>
8931                         <field name="shared" reporter:datatype="bool"/>
8932                         <field name="share_with" reporter:datatype="link"/>
8933                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8934                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8935                 </fields>
8936                 <links>
8937                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8938                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8939                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8940                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8941                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8942                 </links>
8943         </class>
8944         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8945                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8946                         <field name="id" reporter:datatype="id" />
8947                         <field name="owner" reporter:datatype="link"/>
8948                         <field name="create_time" reporter:datatype="timestamp"/>
8949                         <field name="name" reporter:datatype="text"/>
8950                         <field name="data" reporter:datatype="text"/>
8951                         <field name="folder" reporter:datatype="link"/>
8952                         <field name="description" reporter:datatype="text"/>
8953                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8954                 </fields>
8955                 <links>
8956                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8957                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8958                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8959                 </links>
8960         </class>
8961         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8962                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8963                         <field name="id" reporter:datatype="id" />
8964                         <field name="owner" reporter:datatype="link"/>
8965                         <field name="create_time" reporter:datatype="timestamp"/>
8966                         <field name="template" reporter:datatype="link"/>
8967                         <field name="data" reporter:datatype="text"/>
8968                         <field name="folder" reporter:datatype="link"/>
8969                         <field name="recur" reporter:datatype="bool"/>
8970                         <field name="recurrence" reporter:datatype="interval"/>
8971                         <field name="name" reporter:datatype="text"/>
8972                         <field name="description" reporter:datatype="text"/>
8973                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8974                 </fields>
8975                 <links>
8976                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8977                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8978                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8979                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8980                 </links>
8981         </class>
8982         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8983                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8984                         <field name="id" reporter:datatype="id" />
8985                         <field name="runner" reporter:datatype="link"/>
8986                         <field name="start_time" reporter:datatype="timestamp"/>
8987                         <field name="complete_time" reporter:datatype="timestamp"/>
8988                         <field name="run_time" reporter:datatype="timestamp"/>
8989                         <field name="email" reporter:datatype="text"/>
8990                         <field name="excel_format" reporter:datatype="bool"/>
8991                         <field name="csv_format" reporter:datatype="bool"/>
8992                         <field name="html_format" reporter:datatype="bool"/>
8993                         <field name="error_code" reporter:datatype="int"/>
8994                         <field name="error_text" reporter:datatype="text"/>
8995                         <field name="report" reporter:datatype="link"/>
8996                         <field name="folder" reporter:datatype="link"/>
8997                         <field name="chart_pie" reporter:datatype="bool"/>
8998                         <field name="chart_bar" reporter:datatype="bool"/>
8999                         <field name="chart_line" reporter:datatype="bool"/>
9000                 </fields>
9001                 <links>
9002                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9003                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9004                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9005                 </links>
9006         </class>
9007         <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">
9008                 <fields oils_persist:primary="id">
9009                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9010                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9011                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9012                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9013                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9014                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9015                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9016                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9017                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9018                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9019                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9020                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9021                 </fields>
9022                 <links>
9023                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9024                 </links>
9025                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9026                         <actions>
9027                                 <retrieve />
9028                         </actions>
9029                 </permacrud>
9030         </class>
9031         <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">
9032                 <fields oils_persist:primary="id">
9033                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9034                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9035                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9036                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9037                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9038                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9039                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9040                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9041                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9042                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9043                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9044                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9045                 </fields>
9046                 <links>
9047                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9048                 </links>
9049         </class>
9050         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9051                 <fields oils_persist:primary="id">
9052                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9053                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9054                         <field reporter:label="Fingerprint" name="fingerprint" />
9055                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9056                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9057                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9058                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9059                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9060                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9061                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9062                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9063                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9064                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9065                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9066                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9067                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9068                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9069                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9070                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9071                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9072                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9073                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9074                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9075                 </fields>
9076                 <links>
9077                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9078                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9079                 </links>
9080         </class>
9081         <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">
9082                 <fields oils_persist:primary="id">
9083                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9084                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9085                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9086                 </fields>
9087                 <links>
9088                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9089                 </links>
9090         </class>
9091         <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">
9092                 <fields oils_persist:primary="id">
9093                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9094                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9095                 </fields>
9096                 <links>
9097                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9098                 </links>
9099         </class>
9100         <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">
9101                 <fields oils_persist:primary="id">
9102                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9103                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9104                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9105                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9106                 </fields>
9107                 <links>
9108                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9109                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9110                 </links>
9111         </class>
9112         <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">
9113                 <fields oils_persist:primary="xact">
9114                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9115                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9116                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9117                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9118                 </fields>
9119                 <links>
9120                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9121                 </links>
9122         </class>
9123         <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">
9124                 <fields oils_persist:primary="xact">
9125                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9126                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9127                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9128                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9129                 </fields>
9130                 <links>
9131                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9132                 </links>
9133         </class>
9134         <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)">
9135                 <fields oils_persist:primary="id">
9136                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9137                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9138                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9139                 </fields>
9140                 <links>
9141                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9142                 </links>
9143         </class>
9144         <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">
9145                 <fields oils_persist:primary="id">
9146                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9147                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9148                 </fields>
9149                 <links>
9150                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9151                 </links>
9152         </class>
9153         <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">
9154                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9155                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9156                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9157                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9158                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9159                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9160                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9161                 </fields>
9162                 <links>
9163                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9164                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9165                 </links>
9166                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9167                         <actions>
9168                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9169                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9170                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9171                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9172                         </actions>
9173                 </permacrud>
9174         </class>
9175         <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">
9176                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9177                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9178                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9179                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9180                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9181                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9182                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9183                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9184                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9185                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9186                 </fields>
9187                 <links>
9188                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9189                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9190                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9191                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9192                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9193                 </links>
9194                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9195                         <actions>
9196                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9197                                         <context link="formula" field="owner"/>
9198                                 </create>
9199                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9200                                         <context link="formula" field="owner"/>
9201                                 </retrieve>
9202                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9203                                         <context link="formula" field="owner"/>
9204                                 </update>
9205                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9206                                         <context link="formula" field="owner"/>
9207                                 </delete>
9208                         </actions>
9209                 </permacrud>
9210         </class>
9211
9212         <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">
9213                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9214                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9215                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9216                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9217                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9218                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9219                 </fields>
9220                 <links>
9221                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9222                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9223                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9224                 </links>
9225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9226                         <actions>
9227                                 <create permission="CREATE_PURCHASE_ORDER">
9228                                         <context link="formula" field="owner"/>
9229                 </create>
9230                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9231                                         <context link="formula" field="owner"/>
9232                 </retrieve>
9233                                 <update permission="CREATE_PURCHASE_ORDER">
9234                                         <context link="formula" field="owner"/>
9235                 </update>
9236                                 <delete permission="CREATE_PURCHASE_ORDER">
9237                                         <context link="formula" field="owner"/>
9238                 </delete>
9239                         </actions>
9240                 </permacrud>
9241         </class>
9242
9243         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9244                 <fields oils_persist:primary="id">
9245                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9246                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9247                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9248                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9249                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9250                 </fields>
9251                 <links>
9252                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9253                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9254                 </links>
9255         </class>
9256
9257         <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">
9258                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9259                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9260                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9261                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9262                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9263                 </fields>
9264                 <links>
9265                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9266                 </links>
9267                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9268                         <actions>
9269                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9270                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9271                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9272                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9273                         </actions>
9274                 </permacrud>
9275         </class>
9276
9277         <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">
9278                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9279                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9280                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9281                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9282                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9283                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9284                 </fields>
9285                 <links>
9286                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9287                 </links>
9288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9289                         <actions>
9290                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9291                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9292                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9293                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9294                         </actions>
9295                 </permacrud>
9296         </class>
9297
9298         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9299                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9300                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9301                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9302                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9303                 </fields>
9304                 <links>
9305                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9306                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9307                 </links>
9308         </class>
9309
9310         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9311                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9312                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9313                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9314                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9315                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9316                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9317                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9318                 </fields>
9319                 <links>
9320                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9321                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9322                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9323                 </links>
9324         </class>
9325
9326         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9327                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9328                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9329                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9330                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9331                 </fields>
9332                 <links>
9333                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9334                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9335                 </links>
9336         </class>
9337
9338         <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">
9339                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9340                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9341                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9342                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9343                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9344                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9345                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9346                 </fields>
9347                 <links>
9348                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9349                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9350                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9351                 </links>
9352         </class>
9353
9354         <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">
9355                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9356                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9357                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9358                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9359                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9360                 </fields>
9361                 <links>
9362                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9363                 </links>
9364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9365             <actions>
9366                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9367                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9368                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9369                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9370             </actions>
9371                 </permacrud>
9372         </class>
9373
9374         <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">
9375                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9376                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9377                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9378                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9379                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9380                 </fields>
9381                 <links>
9382                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9383                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9384                 </links>
9385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9386                         <actions>
9387                                 <create permission="ADMIN_CLAIM_POLICY">
9388                                         <context link="claim_policy" field="org_unit"/>
9389                 </create>
9390                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9391                                         <context link="claim_policy" field="org_unit"/>
9392                 </retrieve>
9393                                 <update permission="ADMIN_CLAIM_POLICY">
9394                                         <context link="claim_policy" field="org_unit"/>
9395                 </update>
9396                                 <delete permission="ADMIN_CLAIM_POLICY">
9397                                         <context link="claim_policy" field="org_unit"/>
9398                 </delete>
9399                         </actions>
9400                 </permacrud>
9401         </class>
9402
9403     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9404         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9405             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9406             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9407             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9408             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9409             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9410             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9411             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9412             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9413             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9414             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9415             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9416             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9417             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9418             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9419             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9420             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9421         </fields>
9422         <links>
9423             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9424         </links>
9425     </class>
9426
9427     <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">
9428         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9429             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9430             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9431             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9432             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9433             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9434         </fields>
9435     </class>
9436
9437     <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">
9438         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9439             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9440             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9441             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9442             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9443             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9444             <field reporter:label="City" name="city" reporter:datatype="text"/>
9445             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9446             <field reporter:label="State" name="state" reporter:datatype="text"/>
9447             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9448             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9449             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9450         </fields>
9451     </class>
9452
9453     <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">
9454         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9455             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9456             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9457             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9458             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9459             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9460             <field reporter:label="City" name="city" reporter:datatype="text"/>
9461             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9462             <field reporter:label="State" name="state" reporter:datatype="text"/>
9463             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9464             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9465             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9466         </fields>
9467     </class>
9468
9469     <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">
9470         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9471             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9472             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9473             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9474             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9475             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9476             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9477         </fields>
9478     </class>
9479
9480         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9481                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9482                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9483                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9484                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9485                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9486                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9487                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9488                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9489                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9490                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9491                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9492                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9493                 </fields>
9494                 <links>
9495                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9496                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9497                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9498                 </links>
9499         </class>
9500
9501         <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">
9502                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9503                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9504                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9505                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9506                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9507                 </fields>
9508                 <links>
9509                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9510                 </links>
9511         </class>
9512
9513     <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">
9514         <fields>
9515             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9516             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9517             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9518         </fields>
9519                 <links>
9520                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9521                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9522                 </links>
9523     </class>
9524
9525     <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">
9526         <fields>
9527             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9528             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9529         </fields>
9530                 <links>
9531                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9532                 </links>
9533     </class>
9534
9535     <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">
9536         <fields>
9537             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9538             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9539             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9540         </fields>
9541                 <links>
9542                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9543                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9544                 </links>
9545     </class>
9546
9547     <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">
9548         <fields>
9549             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9550             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9551         </fields>
9552                 <links>
9553                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9554                 </links>
9555     </class>
9556
9557     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9558                 <oils_persist:source_definition>
9559
9560             SELECT  DISTINCT l.*
9561               FROM  action.unfulfilled_hold_loops l
9562                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9563               WHERE l.count = m.max
9564
9565                 </oils_persist:source_definition>
9566         <fields>
9567             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9568             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9569             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9570         </fields>
9571                 <links>
9572                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9573                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9574                 </links>
9575     </class>
9576
9577         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9578                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9579                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9580                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9581                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9582                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9583                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9584                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9585                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9586                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9587                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9588                 </fields>
9589                 <links>
9590                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9591                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9592                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9593                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9594                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9595                 </links>
9596         </class>
9597
9598         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9599                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9600                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9601                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9602                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9603                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9604                 </fields>
9605                 <links>
9606                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9607                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9608                 </links>
9609         </class>
9610
9611         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9612                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9613                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9614                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9615                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9616                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9617                 </fields>
9618                 <links>
9619                 </links>
9620         </class>
9621
9622         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9623                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9624                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9625                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9626                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9627                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9628                 </fields>
9629                 <links>
9630                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9631                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9632                 </links>
9633         </class>
9634         
9635         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9636                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9637                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9638                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9639                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9640                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9641                 </fields>
9642                 <links>
9643                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9644                 </links>
9645         </class>
9646         
9647         <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">
9648                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9649                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9650                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9651                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9652                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9653                 </fields>
9654                 <links>
9655                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9656                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9657                 </links>
9658         </class>
9659
9660         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9661                 <fields oils_persist:primary="name">
9662                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9663                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9664                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9665                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9666                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9667                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9668                 </fields>
9669                 <links>
9670                 </links>
9671         </class>
9672
9673         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9674                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9675                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9676                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9677                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9678                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9679                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9680                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9681                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9682                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9683                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9684                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9685                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9686                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9687                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9688                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9689                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9690                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9691                 </fields>
9692                 <links>
9693                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9694                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9695                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9696                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9697                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9698                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9699                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9700                 </links>
9701         </class>
9702
9703         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9704                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9705                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9706                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9707                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9708                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9709                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9710                 </fields>
9711                 <links>
9712                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9713                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9714                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9715                 </links>
9716         </class>
9717
9718         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9719                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9720                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9721                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9722                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9723                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9724                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9725                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9726                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9727                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9728                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9729                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9730                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9731                 </fields>
9732                 <links>
9733                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9734                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9735                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9736                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9737                 </links>
9738         </class>
9739
9740         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9741                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9742                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9743                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9744                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9745                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9746                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9747                 </fields>
9748                 <links>
9749                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9750                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9751                 </links>
9752         </class>
9753
9754         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9755                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9756                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9757                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9758                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9759                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9760                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9761                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9762                 </fields>
9763                 <links>
9764                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9765                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9766                 </links>
9767         </class>
9768
9769         <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">
9770                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9771                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9772                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9773                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9774                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9775                 </fields>
9776                 <links>
9777                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9778                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9779                 </links>
9780         </class>
9781
9782         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9783                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9784                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9785                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9786                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9787                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9788                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9789                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9790                 </fields>
9791                 <links>
9792                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9793                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9794                 </links>
9795         </class>
9796
9797         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9798                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9799                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9800                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9801                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9802                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9803                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9804                 </fields>
9805                 <links>
9806                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9807                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9808                 </links>
9809         </class>
9810
9811         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9812                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9813                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9814                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9815                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9816                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9817                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9818                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9819                 </fields>
9820                 <links>
9821                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9822                 </links>
9823         </class>
9824
9825         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9826                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9827                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9828                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9829                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9830                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9831                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9832                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9833                 </fields>
9834                 <links>
9835                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9836                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9837                 </links>
9838         </class>
9839
9840         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9841                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9842                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9843                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9844                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9845                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9846                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9847                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9848                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9849                 </fields>
9850                 <links>
9851                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9852                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9853                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9854                 </links>
9855         </class>
9856
9857         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9858                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9859                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9860                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9861                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9862                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9863                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9864                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9865                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9866                 </fields>
9867                 <links>
9868                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9869                 </links>
9870         </class>
9871
9872         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9873                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9874                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9875                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9876                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9877                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9878                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9879                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9880                 </fields>
9881                 <links>
9882                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9883                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9884                 </links>
9885         </class>
9886
9887         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9888                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9889                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9890                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9891                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9892                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9893                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9894                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9895                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9896                 </fields>
9897                 <links>
9898                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9899                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9900                 </links>
9901         </class>
9902
9903         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9904                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9905                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9906                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9907                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9908                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9909                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9910                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9911                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9912                 </fields>
9913                 <links>
9914                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9915                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9916                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9917                 </links>
9918         </class>
9919
9920         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9921                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9922                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9923                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9924                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9925                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9926                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9927                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9928                 </fields>
9929                 <links>
9930                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9931                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9932                 </links>
9933         </class>
9934
9935         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9936                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9937                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9938                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9939                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9940                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9941                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9942                 </fields>
9943                 <links>
9944                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9945                 </links>
9946         </class>
9947
9948         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9949                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9950                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9951                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9952                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9953                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9954                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9955                 </fields>
9956                 <links>
9957                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9958                 </links>
9959         </class>
9960
9961         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9962                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9963                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9964                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9965                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9966                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9967                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9968                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9969                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9970                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9971                 </fields>
9972                 <links>
9973                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9974                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9975                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9976                 </links>
9977         </class>
9978
9979         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9980                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9981                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9982                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9983                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9984                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9985                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9986                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9987                 </fields>
9988                 <links>
9989                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9990                 </links>
9991         </class>
9992
9993         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9994                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9995                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9996                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9997                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9998                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9999                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10000                 </fields>
10001                 <links>
10002                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10003                 </links>
10004         </class>
10005
10006         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10007                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10008                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10009                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10010                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10011                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10012                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10013                 </fields>
10014                 <links>
10015                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10016                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10017                 </links>
10018         </class>
10019
10020         <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">
10021                 <fields oils_persist:primary="id">
10022                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10023                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10024                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10025                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10026                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10027                 </fields>
10028                 <links>
10029                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10030                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10031                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10032                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10033                 </links>
10034         </class>
10035
10036         <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">
10037                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10038                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10039                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10040                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10041                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10042                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10043                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10044                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10045                 </fields>
10046                 <links/>
10047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10048                         <actions>
10049                                 <retrieve/>
10050                         </actions>
10051                 </permacrud>
10052         </class>
10053
10054         <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">
10055                 <fields oils_persist:primary="ptype_key">
10056                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10057                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10058                 </fields>
10059                 <links/>
10060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10061                         <actions>
10062                                 <retrieve/>
10063                         </actions>
10064                 </permacrud>
10065         </class>
10066
10067         <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">
10068                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10069                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10070                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10071                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10072                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10073                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10074                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10075                 </fields>
10076                 <links>
10077                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10078                 </links>
10079                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10080                         <actions>
10081                                 <retrieve/>
10082                         </actions>
10083                 </permacrud>
10084         </class>
10085
10086         <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">
10087                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10088                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10089                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10090                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10091                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10092                 </fields>
10093                 <links>
10094                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10095                 </links>
10096                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10097                         <actions>
10098                                 <retrieve/>
10099                         </actions>
10100                 </permacrud>
10101         </class>
10102
10103     <class
10104         id="uvs"
10105         controller="open-ils.cstore open-ils.pcrud"
10106         oils_obj:fieldmapper="url_verify::session"
10107         oils_persist:tablename="url_verify.session"
10108         reporter:label="URL Verification Session"
10109     >
10110         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10111             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10112             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10113                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10114             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10115             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10116             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10117             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10118             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10119             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10120         </fields>
10121
10122         <links>
10123             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10124             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10125             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10126             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10127             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10128         </links>
10129
10130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10131             <actions>
10132                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10133             </actions>
10134         </permacrud>
10135
10136     </class>
10137
10138     <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">
10139         <oils_persist:source_definition>
10140             SELECT
10141                 cbrebi.id AS id,  -- so we can have a pkey in our view
10142                 uvs.id AS session,
10143                 uvs.owning_lib,
10144                 cbrebi.target_biblio_record_entry
10145             FROM url_verify.session uvs
10146             JOIN container.biblio_record_entry_bucket cbreb
10147                 ON (uvs.container = cbreb.id)
10148             JOIN container.biblio_record_entry_bucket_item cbrebi
10149                 ON (cbrebi.bucket = cbreb.id)
10150         </oils_persist:source_definition>
10151         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10152             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10153             <field reporter:label="Session" name="session" reporter:datatype="link" />
10154             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10155             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10156         </fields>
10157         <links>
10158             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10159             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10160             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10161         </links>
10162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10163             <actions>
10164                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10165             </actions>
10166         </permacrud>
10167     </class>
10168
10169     <class
10170         id="uvus"
10171         controller="open-ils.cstore open-ils.pcrud"
10172         oils_obj:fieldmapper="url_verify::url_selector"
10173         oils_persist:tablename="url_verify.url_selector"
10174         reporter:label="URL Verification URL Selector"
10175     >
10176         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10177             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10178             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10179                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10180             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10181         </fields>
10182
10183         <links>
10184             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10185             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10186         </links>
10187
10188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10189             <actions>
10190                 <create permission="URL_VERIFY">
10191                     <context link="session" field="owning_lib"/>
10192                 </create>
10193                 <retrieve permission="URL_VERIFY">
10194                     <context link="session" field="owning_lib"/>
10195                 </retrieve>
10196                 <update permission="URL_VERIFY">
10197                     <context link="session" field="owning_lib"/>
10198                 </update>
10199                 <delete permission="URL_VERIFY">
10200                     <context link="session" field="owning_lib"/>
10201                 </delete>
10202             </actions>
10203         </permacrud>
10204
10205     </class>
10206
10207     <class
10208         id="uvu"
10209         controller="open-ils.cstore open-ils.pcrud"
10210         oils_obj:fieldmapper="url_verify::url"
10211         oils_persist:tablename="url_verify.url"
10212         reporter:label="URL Verification URL"
10213     >
10214         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10215             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10216                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10217                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10218                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10219                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10220             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10221             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10222             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10223             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10224             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10225             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10226             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10227             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10228             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10229             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10230             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10231             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10232             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10233         </fields>
10234
10235         <links>
10236             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10237             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10238             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10239             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10240             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10241         </links>
10242
10243         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10244             <actions>
10245                 <create permission="URL_VERIFY">
10246                     <context link="session" field="owning_lib"/>
10247                 </create>
10248                 <retrieve permission="URL_VERIFY">
10249                     <context link="session" field="owning_lib"/>
10250                 </retrieve>
10251                 <update permission="URL_VERIFY">
10252                     <context link="session" field="owning_lib"/>
10253                 </update>
10254                 <delete permission="URL_VERIFY">
10255                     <context link="session" field="owning_lib"/>
10256                 </delete>
10257             </actions>
10258         </permacrud>
10259
10260     </class>
10261
10262     <class
10263         id="uvva"
10264         controller="open-ils.cstore open-ils.pcrud"
10265         oils_obj:fieldmapper="url_verify::verification_attempt"
10266         oils_persist:tablename="url_verify.verification_attempt"
10267         reporter:label="URL Verification Attempt"
10268     >
10269         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10270             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10271                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10272                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10273             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10274             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10275         </fields>
10276
10277         <links>
10278             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10279             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10280         </links>
10281
10282         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10283             <actions>
10284                 <create permission="URL_VERIFY">
10285                     <context link="session" field="owning_lib"/>
10286                 </create>
10287                 <retrieve permission="URL_VERIFY">
10288                     <context link="session" field="owning_lib"/>
10289                 </retrieve>
10290                 <update permission="URL_VERIFY">
10291                     <context link="session" field="owning_lib"/>
10292                 </update>
10293                 <delete permission="URL_VERIFY">
10294                     <context link="session" field="owning_lib"/>
10295                 </delete>
10296             </actions>
10297         </permacrud>
10298
10299     </class>
10300
10301     <class
10302         id="uvuv"
10303         controller="open-ils.cstore open-ils.pcrud"
10304         oils_obj:fieldmapper="url_verify::url_verification"
10305         oils_persist:tablename="url_verify.url_verification"
10306         reporter:label="URL Verification"
10307     >
10308         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10309             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10310                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10311                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10312             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10313             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10314             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10315             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10316                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10317         </fields>
10318
10319         <links>
10320             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10321             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10322             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10323         </links>
10324
10325         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10326             <actions>
10327                 <create permission="URL_VERIFY">
10328                     <context link="attempt" jump="session" field="owning_lib"/>
10329                 </create>
10330                 <retrieve permission="URL_VERIFY">
10331                     <context link="attempt" jump="session" field="owning_lib"/>
10332                 </retrieve>
10333                 <update permission="URL_VERIFY">
10334                     <context link="attempt" jump="session" field="owning_lib"/>
10335                 </update>
10336                 <delete permission="URL_VERIFY">
10337                     <context link="attempt" jump="session" field="owning_lib"/>
10338                 </delete>
10339             </actions>
10340         </permacrud>
10341
10342     </class>
10343
10344         <class
10345                 id="cfdi"
10346                 controller="open-ils.cstore open-ils.pcrud"
10347                 oils_obj:fieldmapper="config::filter_dialog_interface"
10348                 oils_persist:tablename="config.filter_dialog_interface"
10349                 reporter:label="FilterDialog Interface">
10350                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10351                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10352                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10353                 </fields>
10354                 <links>
10355                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10356                 </links>
10357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10358                         <actions>
10359                                 <retrieve />
10360                         </actions>
10361                 </permacrud>
10362         </class>
10363
10364         <class
10365                 id="cfdfs"
10366                 controller="open-ils.cstore open-ils.pcrud"
10367                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10368                 oils_persist:tablename="config.filter_dialog_filter_set"
10369                 reporter:label="FilterDialog Filter Set">
10370                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10371                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10372                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10373                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10374                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10375                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10376                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10377                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10378                 </fields>
10379                 <links>
10380                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10381                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10382                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10383                 </links>
10384                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10385                         <actions>
10386                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10387                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10388                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10389                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10390                         </actions>
10391                 </permacrud>
10392
10393         </class>
10394
10395         <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">
10396                 <fields oils_persist:primary="code">
10397                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10398                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10399                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10400                 </fields>
10401                 <links/>
10402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10403                         <actions>
10404                                 <retrieve/>
10405                         </actions>
10406                 </permacrud>
10407         </class>
10408
10409         <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">
10410                 <oils_persist:source_definition>
10411
10412             SELECT  b.id,
10413                     MAX(dcp.edit_date) AS last_delete_date
10414              FROM   biblio.record_entry b
10415                     JOIN asset.call_number cn ON (cn.record = b.id)
10416                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10417              WHERE  NOT b.deleted
10418              GROUP BY b.id
10419              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10420
10421                 </oils_persist:source_definition>
10422                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10423                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10424                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10425                 </fields>
10426                 <links>
10427                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10428                 </links>
10429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10430                         <actions>
10431                                 <retrieve/>
10432                         </actions>
10433                 </permacrud>
10434         </class>
10435
10436         <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">
10437                 <oils_persist:source_definition>
10438
10439             -- -- 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.
10440             -- -- 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
10441             -- -- may not.
10442             -- SELECT
10443             --     bre.id AS "bib_id",
10444             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10445             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10446             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10447             -- FROM (
10448                 SELECT
10449                     y.bre AS "id",
10450                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10451                     y.hold_count AS "hold_count",
10452                     (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"
10453                 FROM (
10454                         SELECT
10455                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10456                             COUNT(*) AS "hold_count"
10457                         FROM action.hold_request h
10458                         WHERE
10459                             cancel_time IS NULL
10460                             AND fulfillment_time IS NULL
10461                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10462                         GROUP BY 1
10463                     )y LEFT JOIN (
10464                         SELECT 
10465                             (SELECT id
10466                                 FROM biblio.record_entry 
10467                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10468                             ) AS "bre", 
10469                             COUNT(*) AS "copy_count"
10470                         FROM asset.copy
10471                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10472                         WHERE copy.holdable 
10473                             AND NOT copy.deleted 
10474                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10475                         GROUP BY 1
10476                     )x ON x.bre = y.bre
10477                 -- )z RIGHT JOIN (
10478                 --     SELECT id
10479                 --     FROM biblio.record_entry
10480                 --     WHERE NOT deleted
10481                 -- )bre ON (z.bib_id = bre.id)
10482                 
10483
10484                 </oils_persist:source_definition>
10485                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10486                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10487                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10488                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10489                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10490                 </fields>
10491                 <links>
10492                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10493                 </links>
10494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10495                         <actions>
10496                                 <retrieve/>
10497                         </actions>
10498                 </permacrud>
10499         </class>
10500
10501         <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">
10502                 <oils_persist:source_definition>
10503             SELECT *,
10504                 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,
10505                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10506             FROM
10507                 (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
10508                     FROM
10509                         action.hold_request ahr
10510                         JOIN reporter.hold_request_record rhrr USING (id)
10511                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10512                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10513                     WHERE
10514                         ahr.cancel_time IS NULL
10515                         AND ahr.fulfillment_time IS NULL
10516                     GROUP BY bib_record, pickup_lib
10517                 )x
10518                 JOIN
10519                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10520                     FROM
10521                         action.hold_request ahr
10522                         JOIN reporter.hold_request_record rhrr USING (id)
10523                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10524                     WHERE
10525                         ahr.cancel_time IS NULL
10526                         AND ahr.fulfillment_time IS NULL
10527                     GROUP BY bib_record
10528                 )y
10529                 USING (id)
10530                 </oils_persist:source_definition>
10531                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10532                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10533                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10534                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10535                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10536                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10537                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10538                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10539                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10540                 </fields>
10541                 <links>
10542                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10543                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10544                 </links>
10545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10546                         <actions>
10547                                 <retrieve/>
10548                         </actions>
10549                 </permacrud>
10550         </class>
10551
10552         <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">
10553                 <oils_persist:source_definition>
10554             SELECT
10555                 ac.id,
10556                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10557                 MAX(actac.xact_start) AS last_circ
10558             FROM asset.copy ac
10559                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10560             GROUP BY ac.id
10561
10562             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10563             --SELECT
10564             --    ac.id,
10565             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10566             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10567             --FROM asset.copy ac
10568             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10569             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10570             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10571                 </oils_persist:source_definition>
10572                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10573                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10574                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10575                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10576                 </fields>
10577                 <links>
10578                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10579                 </links>
10580                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10581                         <actions>
10582                                 <retrieve/>
10583                         </actions>
10584                 </permacrud>
10585         </class>
10586
10587         <class id="ctcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::ts_config_list" oils_persist:tablename="config.ts_config_list" reporter:label="Text Search Configs">
10588                 <fields oils_persist:primary="id">
10589                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10590                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10591                 </fields>
10592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10593                         <actions>
10594                                 <retrieve/>
10595                         </actions>
10596                 </permacrud>
10597         </class>
10598
10599         <class id="cmcts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class_ts_map" oils_persist:tablename="config.metabib_class_ts_map" reporter:label="Metabib Class TS Map">
10600                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10601                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10602                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10603                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10604                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10605                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10606                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10607                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10608                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10609                 </fields>
10610                 <links>
10611                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10612                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10613                 </links>
10614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10615                         <actions>
10616                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10617                                 <retrieve/>
10618                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10619                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10620                         </actions>
10621                 </permacrud>
10622         </class>
10623
10624         <class id="cmfts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_ts_map" oils_persist:tablename="config.metabib_field_ts_map" reporter:label="Metabib Field TS Map">
10625                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10626                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10627                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10628                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10629                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10630                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10631                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10632                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10633                 </fields>
10634                 <links>
10635                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10636                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10637                 </links>
10638                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10639                         <actions>
10640                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10641                                 <retrieve/>
10642                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10643                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10644                         </actions>
10645                 </permacrud>
10646         </class>
10647
10648
10649         <!-- ********************************************************************************************************************* -->
10650         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10651         <!-- ********************************************************************************************************************* -->
10652         <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">
10653                 <fields oils_persist:primary="id">
10654                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10655                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10656                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10657                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10658                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10659                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10660                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10661                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10662                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10663                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10664                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10665                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10666                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10667                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10668                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10669                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10670                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10671                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10672                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10673                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10674                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10675                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10676                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10677                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10678                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10679                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10680                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10681                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10682                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10683                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10684                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10685                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10686                 </fields>
10687                 <links>
10688                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10689                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10690                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10691                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10692                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10693                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10694                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10695                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10696                 </links>
10697         </class>
10698
10699         <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">
10700                 <fields oils_persist:primary="id">
10701                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10702                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10703                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10704                 </fields>
10705                 <links>
10706                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10707                 </links>
10708         </class>
10709
10710         <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">
10711                 <fields oils_persist:primary="id">
10712                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10713                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10714                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10715                 </fields>
10716                 <links>
10717                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10718                 </links>
10719         </class>
10720
10721         <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">
10722                 <fields oils_persist:primary="id">
10723                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10724
10725                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10726                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10727                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10728
10729                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10730                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10731                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10732
10733                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10734                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10735
10736                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10737                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10738                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10739
10740                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10741                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10742
10743                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10744                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10745                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10746
10747                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10748                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10749                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10750
10751                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10752                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10753                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10754                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10755
10756                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10757                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10758
10759                 </fields>
10760                 <links>
10761                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10762                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10763                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10764                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10765                 </links>
10766         </class>
10767
10768         <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">
10769                 <oils_persist:source_definition>
10770
10771             SELECT
10772                 po.ordering_agency AS ordering_agency,
10773                 po.id AS purchase_order,
10774                 li.id AS lineitem,
10775                 lid.id AS lineitem_detail,
10776                 cpa.id AS claim_policy_action
10777             FROM
10778                 acq.lineitem_detail lid
10779                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10780                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10781                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10782                 JOIN acq.claim_policy_action cpa ON (
10783                     cpa.claim_policy = cp.id
10784
10785                     -- we only care about claim policy actions whose claim
10786                     -- interval we'd reached or exceeded
10787                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10788
10789                     -- filter out all claim policy actions where claim events
10790                     -- have occurred on or after the action's action_interval
10791                     AND NOT EXISTS (
10792                         SELECT 1
10793                         FROM
10794                             acq.claim_event evt
10795                             JOIN acq.claim claim ON (
10796                                 claim.id = evt.claim
10797                                 AND claim.lineitem_detail = lid.id
10798                             )
10799                         WHERE
10800                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10801                     )
10802                 )
10803             WHERE
10804                 lid.cancel_reason IS NULL
10805                 AND li.cancel_reason IS NULL -- belt/suspenders
10806                 AND po.cancel_reason IS NULL -- belt/suspenders
10807                 AND lid.recv_time IS NULL
10808                 AND po.state = 'on-order'
10809             ORDER BY 1, 2, 3, 4, 5
10810
10811                 </oils_persist:source_definition>
10812                 <fields>
10813                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10814                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10815                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10816                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10817                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10818                 </fields>
10819                 <links>
10820                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10821                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10822                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10823                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10824                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10825                 </links>
10826         </class>
10827         <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">
10828                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10829                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10830                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10831                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10832                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10833                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10834                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10835                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10836                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10837                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10838                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10839                 </fields>
10840                 <links>
10841                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10842                 </links>
10843     </class>
10844         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10845                 <oils_persist:source_definition>
10846             SELECT * FROM acq.lineitem_summary 
10847                                 WHERE item_count > (invoice_count + cancel_count)
10848         </oils_persist:source_definition>
10849                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10850                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10851                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10852                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10853                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10854                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10855                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10856                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10857                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10858                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10859                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10860                 </fields>
10861                 <links>
10862                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10863                 </links>
10864     </class>
10865         <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">
10866                 <oils_persist:source_definition>
10867
10868                         SELECT  t.*
10869                           FROM  action.transit_copy t
10870                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10871                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10872                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10873
10874                 </oils_persist:source_definition>
10875                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10876                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10877                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10878                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10879                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10880                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10881                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10882                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10883                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10884                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10885                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10886                 </fields>
10887                 <links>
10888                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10889                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10890                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10891                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10892                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10893                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10894                 </links>
10895         </class>
10896
10897     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10898                 <oils_persist:source_definition>
10899
10900         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10901                 SELECT
10902                         cp.id as copy,
10903                         COUNT(circ.id),
10904                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10905                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10906                 FROM
10907                         asset.copy cp
10908                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10909                 GROUP BY 1, 3, 4
10910                 UNION ALL
10911                 SELECT
10912                         cp.id as copy,
10913                         COUNT(circ.id),
10914                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10915                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10916                 FROM
10917                         asset.copy cp
10918                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10919                 GROUP BY 1, 3, 4
10920                 UNION ALL
10921                 SELECT
10922                         id as copy,
10923                         circ_count,
10924                         -1 AS year,
10925                         false as is_renewal
10926                 FROM
10927                         extend_reporter.legacy_circ_count
10928         )x GROUP BY 1, 3, 4
10929
10930                 </oils_persist:source_definition>
10931         <fields>
10932             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10933             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10934             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10935             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10936         </fields>
10937                 <links>
10938                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10939                 </links>
10940                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10941                         <actions>
10942                                 <retrieve/>
10943                         </actions>
10944                 </permacrud>
10945     </class>
10946
10947         <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">
10948                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10949                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10950                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10951                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10952                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10953                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10954                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10955                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10956                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10957                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10958                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10959                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10960                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10961                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10962                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10963                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10964                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10965                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10966                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10967                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10968                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10969                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10970                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10971                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10972                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
10973                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10974                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10975                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10976                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10977                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10978                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10979                 </fields>
10980                 <links>
10981                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10982                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10983                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10984                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10985                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10986                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10987                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10988                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10989                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10990                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10991                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10992                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10993                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10994                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10995                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10996                 </links>
10997         </class>
10998
10999     <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">
11000         <fields oils_persist:primary="id">
11001             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11002             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11003             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11004             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11005             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11006             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11007             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11008             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11009             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11010             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11011             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11012             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11013             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11014             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11015             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11016             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11017             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11018             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11019             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11020             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11021             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11022             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11023             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11024             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11025             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11026             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11027             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11028             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11029             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11030             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11031             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11032             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11033             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11034             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11035         </fields>
11036         <links>
11037             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11038             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11039             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11040             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11041             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11042             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11043             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11044             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11045         </links>
11046     </class>
11047
11048     <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">
11049         <fields oils_persist:primary="id">
11050             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11051             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11052             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11053             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11054         </fields>
11055         <links>
11056             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11057             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11058         </links>
11059     </class>
11060
11061     <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">
11062         <fields oils_persist:primary="owning_lib">
11063             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11064             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11065             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11066         </fields>
11067         <links>
11068             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11069         </links>
11070     </class>
11071
11072     <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">
11073         <fields oils_persist:primary="id">
11074             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11075             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11076             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11077             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11078             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11079         </fields>
11080         <links>
11081             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11082             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11083             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11084         </links>
11085     </class>
11086
11087     <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">
11088         <fields oils_persist:primary="circ_lib">
11089             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11090             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11091             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11092             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11093         </fields>
11094         <links>
11095             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11096             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11097         </links>
11098     </class>
11099
11100     <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">
11101         <fields oils_persist:primary="id">
11102             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11103             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11104             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11105             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11106             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11107         </fields>
11108         <links>
11109             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11110             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11111             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11112         </links>
11113     </class>
11114
11115     <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">
11116         <fields oils_persist:primary="home_ou">
11117             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11118             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11119             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11120             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11121         </fields>
11122         <links>
11123             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11124             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11125         </links>
11126     </class>
11127         <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">
11128                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11129                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11130                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11131                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11132                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11133                 </fields>
11134                 <links>
11135                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11136                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11137                 </links>
11138                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11139                         <actions>
11140                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11141                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11142                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11143                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11144                         </actions>
11145                 </permacrud>
11146         </class>
11147         <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">
11148                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11149                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11150                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11151                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11152                 </fields>
11153                 <links>
11154                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11155                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11156                         </links>
11157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11158                 <actions>
11159                                 <create permission="ADMIN_ACQ_FUND_TAG">
11160                                         <context link="tag" field="owner"/>
11161                                 </create>
11162                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11163                                         <context link="tag" field="owner"/>
11164                                 </retrieve>
11165                                 <update permission="ADMIN_ACQ_FUND_TAG">
11166                                         <context link="tag" field="owner"/>
11167                                 </update>
11168                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11169                                         <context link="tag" field="owner"/>
11170                                 </delete>
11171                         </actions>
11172                 </permacrud>
11173         </class>
11174         <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">
11175                 <oils_persist:source_definition><![CDATA[
11176                 SELECT
11177                         poi.purchase_order AS purchase_order,
11178                         ii.invoice AS invoice,
11179                         NULL AS lineitem,
11180                         poi.id AS po_item,
11181                         NULL AS picklist
11182                 FROM
11183                         acq.po_item poi
11184                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11185                 UNION SELECT
11186                         jub.purchase_order AS purchase_order,
11187                         ie.invoice AS invoice,
11188                         jub.id AS lineitem,
11189                         NULL AS po_item,
11190                         jub.picklist AS picklist
11191                 FROM
11192                         acq.lineitem jub
11193                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11194                 UNION SELECT
11195                         ii.purchase_order AS purchase_order,
11196                         ii.invoice AS invoice,
11197                         NULL AS lineitem,
11198                         NULL AS po_item,
11199                         NULL AS picklist
11200                 FROM
11201                         acq.invoice_item ii
11202                 WHERE ii.po_item IS NULL
11203                 UNION SELECT
11204                         ie.purchase_order AS purchase_order,
11205                         ie.invoice AS invoice,
11206                         NULL AS lineitem,
11207                         NULL AS po_item,
11208                         NULL AS picklist
11209                 FROM
11210                         acq.invoice_entry ie
11211                 WHERE ie.lineitem IS NULL
11212                 UNION SELECT
11213                         NULL AS purchase_order,
11214                         NULL AS invoice,
11215                         jub.id AS lineitem,
11216                         NULL AS po_item,
11217                         jub.picklist AS picklist
11218                 FROM
11219                         acq.lineitem jub
11220                 WHERE jub.purchase_order IS NULL
11221                 ]]></oils_persist:source_definition>
11222                 <fields>
11223                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11224                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11225                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11226                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11227                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11228                 </fields>
11229                 <links>
11230                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11231                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11232                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11233                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11234                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11235                 </links>
11236         </class>
11237         <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">
11238                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11239                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11240                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11241                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11242                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11243                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11244                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11245                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11246                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11247                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11248                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11249                 </fields>
11250                 <links>
11251                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11252                 </links>
11253                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11254                         <actions>
11255                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11256                                 <retrieve/>
11257                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11258                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11259                         </actions>
11260                 </permacrud>
11261         </class>
11262
11263         <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">
11264                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11265                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11266                         <field name="date_applied" reporter:datatype="timestamp"/>
11267                         <field name="org" reporter:datatype="org_unit"/>
11268                         <field name="original_value" reporter:datatype="text"/>
11269                         <field name="new_value" reporter:datatype="text"/>
11270                         <field name="field_name" reporter:datatype="link"/>
11271                 </fields>
11272                 <links>
11273                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11274                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11275                 </links>
11276                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11277                         <actions>
11278                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11279                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11280                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11281                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11282                         </actions>
11283                 </permacrud>
11284         </class>
11285         <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">
11286                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11287                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11288                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11289                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11290                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11291                 </fields>
11292                 <links>
11293                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11294                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11295                 </links>
11296         </class>
11297         <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">
11298                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11299                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11300                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11301                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11302                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11303                 </fields>
11304                 <links>
11305                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11306                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11307                 </links>
11308         </class>
11309         <class id="cfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group" oils_persist:tablename="config.floating_group" reporter:label="Floating Group">
11310                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11311                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11312                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11313                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11314                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11315                 </fields>
11316                 <links>
11317                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11318                 </links>
11319                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11320                         <actions>
11321                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11322                                 <retrieve/>
11323                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11324                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11325                         </actions>
11326                 </permacrud>
11327         </class>
11328         <class id="cfgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group_member" oils_persist:tablename="config.floating_group_member" reporter:label="Floating Group Members">
11329                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11330                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11331                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11332                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11333                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11334                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11335                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11336                 </fields>
11337                 <links>
11338                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11339                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11340                 </links>
11341                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11342                         <actions>
11343                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11344                                 <retrieve/>
11345                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11346                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11347                         </actions>
11348                 </permacrud>
11349         </class>
11350
11351         <!-- ********************************************************************************************************************* -->
11352
11353 </IDL>
11354
11355 <!--
11356     vim:noet:ts=4:sw=4:
11357 -->