]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Stamping upgrade for truncate-to-max-fine
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                 </fields>
85                 <links>
86                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
87                 </links>
88         </class>
89
90         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
91                 <fields>
92                         <field name="workstation" oils_persist:virtual="true" />
93                         <field name="cash_payment" oils_persist:virtual="true" />
94                         <field name="check_payment" oils_persist:virtual="true" />
95                         <field name="credit_card_payment" oils_persist:virtual="true" />
96                 </fields>
97                 <links>
98                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
99                 </links>
100         </class>
101
102         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
103                 <fields>
104                         <field name="id" oils_persist:virtual="true" />
105                         <field name="children" oils_persist:virtual="true" />
106                         <field name="owner_doc" oils_persist:virtual="true" />
107                         <field name="intra_doc_id" oils_persist:virtual="true" />
108                         <field name="parent_node" oils_persist:virtual="true" />
109                         <field name="node_type" oils_persist:virtual="true" />
110                         <field name="namespace_uri" oils_persist:virtual="true" />
111                         <field name="name" oils_persist:virtual="true" />
112                         <field name="value" oils_persist:virtual="true" />
113                 </fields>
114         </class>
115
116         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
117                 <fields>
118                         <field name="title" oils_persist:virtual="true" />
119                         <field name="author" oils_persist:virtual="true" />
120                         <field name="doc_id" oils_persist:virtual="true" />
121                         <field name="doc_type" oils_persist:virtual="true" />
122                         <field name="pubdate" oils_persist:virtual="true" />
123                         <field name="isbn" oils_persist:virtual="true" />
124                         <field name="publisher" oils_persist:virtual="true" />
125                         <field name="tcn" oils_persist:virtual="true" />
126                         <field name="subject" oils_persist:virtual="true" />
127                         <field name="types_of_resource" oils_persist:virtual="true" />
128                         <field name="call_numbers" oils_persist:virtual="true" />
129                         <field name="edition" oils_persist:virtual="true" />
130                         <field name="online_loc" oils_persist:virtual="true" />
131                         <field name="synopsis" oils_persist:virtual="true" />
132                         <field name="physical_description" oils_persist:virtual="true" />
133                         <field name="toc" oils_persist:virtual="true" />
134                         <field name="copy_count" oils_persist:virtual="true" />
135                         <field name="series" oils_persist:virtual="true" />
136                         <field name="serials" oils_persist:virtual="true" />
137                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
142                 <fields>
143                         <field name="err_msg" oils_persist:virtual="true" />
144                         <field name="type" oils_persist:virtual="true" />
145                 </fields>
146         </class>
147
148         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
149                 <fields>
150                         <field name="err_msg" oils_persist:virtual="true" />
151                         <field name="type" oils_persist:virtual="true" />
152                 </fields>
153         </class>
154
155         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
156                 <fields oils_persist:primary="matchpoint">
157                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
158                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
159                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
160                 </fields>
161                 <links>
162                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
163                 </links>
164         </class>
165
166         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
167         <!-- when the time is right, turn me into a view.  -->
168                 <fields>
169             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
170             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
171             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
172             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
174             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
176             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
178             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
179                 </fields>
180         </class>
181
182         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
183                 <fields>
184                         <field name="public_name" oils_persist:virtual="true" />
185                         <field name="target_url" oils_persist:virtual="true" />
186                         <field name="target_coverage" oils_persist:virtual="true" />
187                         <field name="target_embargo" oils_persist:virtual="true" />
188                 </fields>
189         </class>
190
191         <!-- Actually in the DB -->
192         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
193                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
194                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
195                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
196                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
197                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
198                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
199                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
200                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
201                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
202                 </fields>
203                 <links>
204                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
205                 </links>
206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
207                         <actions>
208                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
209                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
210                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
211                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
212                         </actions>
213                 </permacrud>
214         </class>
215
216         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
217                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
218                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
219                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
220                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
221                 </fields>
222                 <links>
223                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
224                 </links>
225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
226                         <actions>
227                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
228                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
229                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
230                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
231                         </actions>
232                 </permacrud>
233         </class>
234
235         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
236                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
237                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
238                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
239                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
240                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
241                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
242                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
243                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
244                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
245                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
246                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
247                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
248                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
249                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
250                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
251                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
252                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
253                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
254                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
255                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
256                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
257                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
258                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
259                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
260                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
261                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
262                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
263                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
264                 </fields>
265                 <links>
266                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
267                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
268                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
269                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
270                 </links>
271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
272                         <actions>
273                                 <create permission="CREATE_IMPORT_ITEM">
274                     <context link="definition" field="owner"/>
275                                 </create>
276                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
277                     <context link="definition" field="owner"/>
278                                 </retrieve>
279                                 <update permission="UPDATE_IMPORT_ITEM">
280                     <context link="definition" field="owner"/>
281                                 </update>
282                                 <delete permission="DELETE_IMPORT_ITEM">
283                     <context link="definition" field="owner"/>
284                                 </delete>
285                         </actions>
286                 </permacrud>
287         </class>
288
289         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
290                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
291                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
292                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
293                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
294                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
295                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
296                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
297                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
298                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
299                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
300                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
301                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
302                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
303                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
304                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
305                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
306                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
307                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
308                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
309                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
310                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
311                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
312                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
313                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
314                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
315                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
316                 </fields>
317                 <links>
318                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
319                 </links>
320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
321                         <actions>
322                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
323                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
324                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
325                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
326                         </actions>
327                 </permacrud>
328         </class>
329
330         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
331                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
332                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
333                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
334                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
335                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
336                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
337                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
338                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
339                 </fields>
340                 <links>
341                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
342                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
343                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
344                 </links>
345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
346                         <actions>
347                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
348                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
349                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
350                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
351                         </actions>
352                 </permacrud>
353         </class>
354
355         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
356                 <fields oils_persist:primary="code">
357                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
358                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
359                 </fields>
360                 <links>
361                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
362                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
363                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
364                 </links>
365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
366                         <actions>
367                                 <retrieve/>
368                         </actions>
369                 </permacrud>
370         </class>
371
372         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
373                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
374                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
375                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
376                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
377                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
378                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
379                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
380                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
381                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
382                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
383                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
384                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
385                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
386                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
387                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
388                 </fields>
389                 <links>
390                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
391                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
392                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
393                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
394             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
395             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
396             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
397                 </links>
398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
399                         <actions>
400                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
401                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
402                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
403                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
404                         </actions>
405                 </permacrud>
406         </class>
407
408         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
409                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
410                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
411                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
412                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
413                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
414                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
415                 </fields>
416                 <links/>
417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
418                         <actions>
419                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
420                 <retrieve/>
421                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
422                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
423                         </actions>
424                 </permacrud>
425         </class>
426
427         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
428                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
429                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
430                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
431                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
432                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
433                 </fields>
434                 <links>
435                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
436                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
437                 </links>
438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
439                         <actions>
440                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
441                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
442                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
443                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
444                         </actions>
445                 </permacrud>
446         </class>
447
448         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
449                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
450                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
451                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
452                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
453                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
454                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
455                 </fields>
456                 <links>
457                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
458                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
459                 </links>
460                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
461                         <actions>
462                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
463                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
464                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
465                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
466                         </actions>
467                 </permacrud>
468         </class>
469
470         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
471                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
472                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
473                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
474                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
475                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
476                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
477                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
478                 </fields>
479                 <links>
480                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
481                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
482                 </links>
483                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
484                         <actions>
485                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
486                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
487                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
488                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
489                         </actions>
490                 </permacrud>
491         </class>
492
493         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
494                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
495                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
496                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
497                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
498                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
499                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
500                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
501                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
502                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
503                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
504                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
505                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
506                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
507                 </fields>
508                 <links>
509                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
510                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
511                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
512             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
513             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
514                 </links>
515                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
516                         <actions>
517                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
518                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
519                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
520                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
521                         </actions>
522                 </permacrud>
523         </class>
524
525         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
526                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
527                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
528                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
529                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
530                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
531                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
532                 </fields>
533                 <links/>
534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
535                         <actions>
536                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
537                 <retrieve/>
538                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
539                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
540                         </actions>
541                 </permacrud>
542         </class>
543
544         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
545                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
546                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
547                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
548                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
549                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
550                 </fields>
551                 <links>
552                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
553                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
554                 </links>
555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
556                         <actions>
557                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
558                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
559                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
560                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
561                         </actions>
562                 </permacrud>
563         </class>
564
565         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
566                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
567                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
568                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
569                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
570                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
571                 </fields>
572                 <links>
573                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
574                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
575                 </links>
576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
577                         <actions>
578                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
579                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
580                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
581                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
582                         </actions>
583                 </permacrud>
584         </class>
585
586         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
587                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
588                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
589                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
590                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
591                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
592                 </fields>
593                 <links>
594                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
595                 </links>
596                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
597                         <actions>
598                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
599                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
600                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
601                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
602                         </actions>
603                 </permacrud>
604         </class>
605
606         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
607                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
608                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
609                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
610                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
611                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
612                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
613                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
614                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
615             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
616                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
617                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
618                 </fields>
619                 <links>
620                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
621                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
622                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
623                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
624                 </links>
625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
626                         <actions>
627                                 <create permission="ADMIN_IMPORT_MATCH_SET">
628                     <context link="match_set" field="owner"/>
629                                 </create>
630                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
631                     <context link="match_set" field="owner"/>
632                                 </retrieve>
633                                 <update permission="ADMIN_IMPORT_MATCH_SET">
634                     <context link="match_set" field="owner"/>
635                                 </update>
636                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
637                     <context link="match_set" field="owner"/>
638                                 </delete>
639                         </actions>
640                 </permacrud>
641         </class>
642
643         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
644                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
645                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
646                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
647                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
648                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
649                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
650                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
651                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
652                 </fields>
653                 <links>
654                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
655                 </links>
656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
657                         <actions>
658                                 <create permission="ADMIN_IMPORT_MATCH_SET">
659                     <context link="match_set" field="owner"/>
660                                 </create>
661                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
662                     <context link="match_set" field="owner"/>
663                                 </retrieve>
664                                 <update permission="ADMIN_IMPORT_MATCH_SET">
665                     <context link="match_set" field="owner"/>
666                                 </update>
667                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
668                     <context link="match_set" field="owner"/>
669                                 </delete>
670                         </actions>
671                 </permacrud>
672         </class>
673
674         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
675                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
676                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
677                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
678                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
679                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
680                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
681                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
682                 </fields>
683                 <links>
684                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
685                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
686                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
687                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
688                 </links>
689         </class>
690
691     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
692         <fields oils_persist:primary="name">
693             <field reporter:label="Name" name="name" reporter:datatype="text"/>
694             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
695             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
696             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
697         </fields>
698         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
699             <actions>
700                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
701                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
702                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
703                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
704             </actions>
705         </permacrud>
706     </class>
707
708     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
709         <fields oils_persist:primary="id">
710             <field reporter:label="ID" name="id" reporter:datatype="id"/>
711             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
712             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
713             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
714             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
715         </fields>
716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
717             <actions>
718                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
719                 <retrieve/>
720                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
721                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
722             </actions>
723         </permacrud>
724     </class>
725
726         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
727                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
728                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
729                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
730                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
731                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
732                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
733                 </fields>
734                 <links>
735                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
736                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
737                 </links>
738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
739             <actions>
740                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
741                 <retrieve/>
742                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
743                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
744             </actions>
745         </permacrud>
746         </class>
747
748         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
749                 <fields oils_persist:primary="name">
750                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
751                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
752                         <field reporter:label="Description" name="description" reporter:datatype="text" />
753                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
754                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
755                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
756                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
757                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
758                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
759                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
760                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
761                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
762                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
763                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
764                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
765                 </fields>
766                 <links>
767                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
768                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
769                 </links>
770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
771             <actions>
772                 <create permission="ADMIN_SVF" global_required="true"/>
773                 <retrieve/>
774                 <update permission="ADMIN_SVF" global_required="true"/>
775                 <delete permission="ADMIN_SVF" global_required="true"/>
776             </actions>
777         </permacrud>
778         </class>
779
780         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
781                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
782                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
783                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
784                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
785             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
786                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
787                 </fields>
788                 <links/>
789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790             <actions>
791                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
792                 <retrieve/>
793                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
794                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
795             </actions>
796         </permacrud>
797         </class>
798
799         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true">
800                 <fields oils_persist:primary="id">
801                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
802                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
803                 </fields>
804                 <links>
805                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
806                 </links>
807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
808             <actions>
809                 <retrieve/>
810             </actions>
811         </permacrud>
812         </class>
813
814         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
815                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
816                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
817                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
818                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
819                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
820                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
821                 </fields>
822                 <links>
823                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
824                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
825                 </links>
826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
827             <actions>
828                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
829                 <retrieve/>
830                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
831                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
832             </actions>
833         </permacrud>
834         </class>
835
836         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
837                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
838                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
839                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
840                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
841                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
842                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
843                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
844                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
845             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
846                 </fields>
847                 <links>
848                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
849                 </links>
850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
851             <actions>
852                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
853                 <retrieve/>
854                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
855                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
856             </actions>
857         </permacrud>
858         </class>
859
860         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
861                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
862                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
863                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
864                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
865                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
866                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
867                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
868                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
869                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
870                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
871                 </fields>
872                 <links>
873                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
874                 </links>
875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
876             <actions>
877                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
878                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
879                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
880                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
881             </actions>
882         </permacrud>
883         </class>
884
885     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
886         <fields oils_persist:primary="name">
887             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
888             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
889             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
890             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
891             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
892             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
893             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
894             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
895             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
896             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
897         </fields>
898         <links>
899             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
900             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
901         </links>
902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
903             <actions>
904                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
905                 <retrieve/>
906                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
907                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
908             </actions>
909         </permacrud>
910     </class>
911
912     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
913         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
914             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
915             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
916             <field reporter:label="Name" name="name" reporter:datatype="text"/>
917             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
918             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
919             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
920             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
921         </fields>
922         <links>
923             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
924         </links>
925         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
926             <actions>
927                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
928                 <retrieve/>
929                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
930                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
931             </actions>
932         </permacrud>
933     </class>
934
935         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
936                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
937                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
938                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
939                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
940                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
941                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
942                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
943                 </fields>
944                 <links>
945             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
946             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
947                 </links>
948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
949                         <actions>
950                                 <retrieve/>
951                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
952                         </actions>
953                 </permacrud>
954         </class>
955
956         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
957                 <fields oils_persist:primary="key">
958                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
959                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
960                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
961                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
962                 </fields>
963                 <links/>
964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
965                         <actions>
966                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
967                                 <retrieve/>
968                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
969                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
970                         </actions>
971                 </permacrud>
972         </class>
973
974         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
975                 <fields oils_persist:primary="module">
976                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
977                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
978                 </fields>
979                 <links/>
980         </class>
981
982         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
983                 <fields oils_persist:primary="module">
984                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
985                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
986                 </fields>
987                 <links/>
988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
989                         <actions>
990                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
991                                 <retrieve/>
992                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
993                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
994                         </actions>
995                 </permacrud>
996         </class>
997
998         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
999                 <fields oils_persist:primary="module">
1000                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1001                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1002                 </fields>
1003                 <links/>
1004                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1005                         <actions>
1006                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1007                                 <retrieve/>
1008                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1009                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1010                         </actions>
1011                 </permacrud>
1012         </class>
1013
1014         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1015                 <fields oils_persist:primary="module">
1016                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1017                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1018                 </fields>
1019                 <links/>
1020                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1021                         <actions>
1022                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1023                                 <retrieve/>
1024                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1025                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1026                         </actions>
1027                 </permacrud>
1028         </class>
1029
1030         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1031                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1032                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1033                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1034                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1035                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1036                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1037                 </fields>
1038                 <links>
1039                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1040                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1041                 </links>
1042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1043                         <actions>
1044                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1045                     <context link="event_def" field="owner"/>
1046                 </create>
1047                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1048                     <context link="event_def" field="owner"/>
1049                 </retrieve>
1050                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1051                     <context link="event_def" field="owner"/>
1052                 </update>
1053                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1054                     <context link="event_def" field="owner"/>
1055                 </delete>
1056                         </actions>
1057                 </permacrud>
1058         </class>
1059
1060         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1061                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1062                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1063                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1064                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1065                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1066                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1067                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1068                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1069                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1070                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1071                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1072                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1073                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1074                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1075                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1076                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1077                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1078                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1079                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1080                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1081                 </fields>
1082                 <links>
1083                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1084                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1085                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1086                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1087                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1088                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1089                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1090                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1091                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1092                 </links>
1093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1094                         <actions>
1095                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1096                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1097                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1098                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1099                         </actions>
1100                 </permacrud>
1101         </class>
1102
1103         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1104                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1105                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1106                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1107                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1108                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1109                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1110                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1111                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1112                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1113                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1114                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1115                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1116                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1117                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1118                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1119                 </fields>
1120                 <links>
1121                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1122                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1123                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1124                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1125                 </links>
1126         </class>
1127
1128         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1129                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1130                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1131                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1132                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1133                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1134                 </fields>
1135                 <links>
1136                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1137                 </links>
1138                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1139                         <actions>
1140                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1141                     <context link="event_def" field="owner"/>
1142                 </create>
1143                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1144                     <context link="event_def" field="owner"/>
1145                 </retrieve>
1146                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1147                     <context link="event_def" field="owner"/>
1148                 </update>
1149                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1150                     <context link="event_def" field="owner"/>
1151                 </delete>
1152                         </actions>
1153                 </permacrud>
1154         </class>
1155
1156         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1157                 <oils_persist:source_definition><![CDATA[
1158                 SELECT  atevdef.hook,
1159                         atevdef.name,
1160                         atevdef.reactor,
1161                         atev.id,
1162                         atev.event_def,
1163                         atev.add_time,
1164                         atev.run_time,
1165                         atev.start_time,
1166                         atev.update_time,
1167                         atev.complete_time,
1168                         atev.update_process,
1169                         atev.state,
1170                         atev.user_data,
1171                         atev.template_output,
1172                         atev.error_output,
1173                         atev.async_output,
1174                         targ_circ.id AS target_circ,
1175                         targ_ahr.id AS target_hold,
1176                         COALESCE(
1177                                 targ_circ.circ_lib,
1178                                 targ_ahr.pickup_lib
1179                         ) AS perm_lib
1180                 FROM action_trigger.event atev
1181                 JOIN action_trigger.event_definition atevdef ON
1182                         (atevdef.id = atev.event_def)
1183                 JOIN action_trigger.hook ath ON
1184                         (ath.key = atevdef.hook)
1185                 LEFT JOIN action.circulation targ_circ ON
1186                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1187                 LEFT JOIN action.hold_request targ_ahr ON
1188                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1189                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1190                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1191                                 'circ.staff.max_visible_event_age',
1192                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1193                         ) UNION
1194                         SELECT '1000 YEARS'::INTERVAL AS value
1195                 ) ous)
1196                 ]]></oils_persist:source_definition>
1197                 <fields oils_persist:primary="id">
1198                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1199                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1200                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1201                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1202                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1203                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1204                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1205                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1206                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1207                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1208                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1209                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1210                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1211                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1212                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1213                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1214                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1215                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1216                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1217                 </fields>
1218                 <links>
1219                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1220                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1221                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1222                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1223                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1224                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1225                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1226                 </links>
1227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1228                         <actions>
1229                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1230                         </actions>
1231                 </permacrud>
1232         </class>
1233
1234         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1235                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1236                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1237                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1238                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1239                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1240                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1241                 </fields>
1242                 <links>
1243                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1244                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1245                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1246                 </links>
1247         </class>
1248
1249         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1250                 <fields oils_persist:primary="code">
1251                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1252                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1253                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1254                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1255                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1256                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1257                 </fields>
1258                 <links/>
1259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1260             <actions>
1261                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1262                 <retrieve/>
1263                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1264                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1265             </actions>
1266         </permacrud>
1267         </class>
1268
1269         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1270                 <fields oils_persist:primary="code">
1271                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1272                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1273                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1274                 </fields>
1275                 <links/>
1276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1277             <actions>
1278                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1279                 <retrieve/>
1280                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1281                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1282             </actions>
1283         </permacrud>
1284         </class>
1285
1286         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1287                 <fields oils_persist:primary="code">
1288                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1289                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1290                 </fields>
1291                 <links/>
1292         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1293             <actions>
1294                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1295                 <retrieve/>
1296                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1297                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1298             </actions>
1299         </permacrud>
1300         </class>
1301
1302         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1303                 <fields oils_persist:primary="code">
1304                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1305                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1306                 </fields>
1307                 <links/>
1308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1309             <actions>
1310                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1311                 <retrieve/>
1312                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1313                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1314             </actions>
1315         </permacrud>
1316         </class>
1317
1318         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1319                 <fields oils_persist:primary="code">
1320                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1321                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1322                 </fields>
1323                 <links/>
1324         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1325             <actions>
1326                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1327                 <retrieve/>
1328                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1329                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1330             </actions>
1331         </permacrud>
1332         </class>
1333
1334         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1335                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1336                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1337                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1338                 </fields>
1339                 <links/>
1340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1341             <actions>
1342                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1343                 <retrieve/>
1344                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1345                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1346             </actions>
1347         </permacrud>
1348         </class>
1349
1350         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1351                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1352                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1353                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1354                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1355                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1356                 </fields>
1357         <links>
1358             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1359             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1360             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1361         </links>
1362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1363             <actions>
1364                 <create permission="UPDATE_COPY">
1365                     <context link="target_copy" field="circ_lib"/>
1366                 </create>
1367                 <retrieve/>
1368                 <update permission="UPDATE_COPY">
1369                     <context link="target_copy" field="circ_lib"/>
1370                 </update>
1371                 <delete permission="UPDATE_COPY">
1372                     <context link="target_copy" field="circ_lib"/>
1373                 </delete>
1374             </actions>
1375         </permacrud>
1376         </class>
1377
1378         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1379                 <fields oils_persist:primary="code">
1380                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1381                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1382                 </fields>
1383                 <links/>
1384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1385             <actions>
1386                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1387                 <retrieve/>
1388                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1389                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1390             </actions>
1391         </permacrud>
1392         </class>
1393
1394         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1395                 <fields oils_persist:primary="code">
1396                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1397                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1398                 </fields>
1399                 <links/>
1400         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1401             <actions>
1402                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1403                 <retrieve/>
1404                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1405                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1406             </actions>
1407         </permacrud>
1408         </class>
1409
1410         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1411                 <fields oils_persist:primary="code">
1412                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1413                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1414                 </fields>
1415                 <links/>
1416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1417             <actions>
1418                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1419                 <retrieve/>
1420                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1421                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1422             </actions>
1423         </permacrud>
1424         </class>
1425
1426     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1427         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1428             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1429             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1430             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1431             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1432             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1433             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1434             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1435             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1436             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1437             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1438             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1439             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1440             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1441             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1442             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1443             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1444             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1445         </fields>
1446         <links/>
1447         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1448             <actions>
1449                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1450                 <retrieve/>
1451                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1452                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1453             </actions>
1454         </permacrud>
1455     </class>
1456
1457     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1458         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1459             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1460             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1461             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1462             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1463             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1464             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1465             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1466             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1467             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1468             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1469             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1470             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1471             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1472             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1473             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1474             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1475             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1476             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1477             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1478         </fields>
1479         <links/>
1480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1481             <actions>
1482                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1483                 <retrieve/>
1484                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1485                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1486             </actions>
1487         </permacrud>
1488     </class>
1489
1490     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1491         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1492             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1493             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1494             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1495             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1496             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1497         </fields>
1498         <links>
1499             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1500             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1501             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1502         </links>
1503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1504             <actions>
1505                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1506                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1507                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1508                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1509             </actions>
1510         </permacrud>
1511     </class>
1512
1513         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1514                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1515                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1516                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1517                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1518                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1519                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1520                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1521                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1522                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1523                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1524                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1525                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1526                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1527                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1528                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1529                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1530                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1531             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1532                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1533                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1534                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1535                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1536                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1537                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1538                 </fields>
1539                 <links>
1540                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1541                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1542                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1543                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1544                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1545                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1546                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1547                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1548                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1549                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1550                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1551                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1552                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1553             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1554                 </links>
1555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1556             <actions>
1557                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1558                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1559                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1560                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1561             </actions>
1562         </permacrud>
1563         </class>
1564
1565         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1566                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1567                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1568                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1569                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1570                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1571                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1572                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1573                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1574                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1575                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1576                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1577                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1578                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1579                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1580                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1581                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1582             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1583                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1584                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1585             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1586                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1587                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1588                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1589                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1590             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1591             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1592             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1593                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1594                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1595                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1596                 </fields>
1597                 <links>
1598                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1599                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1600                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1601                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1602                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1603                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1604                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1605                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1606                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1607                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1608                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1609                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1610                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1611                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1612             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1613                 </links>
1614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1615             <actions>
1616                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1617                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1618                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1619                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1620             </actions>
1621         </permacrud>
1622         </class>
1623
1624     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1625         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1626             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1627             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1628             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1629         </fields>
1630         <links/>
1631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1632             <actions>
1633                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1634                 <retrieve/>
1635                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1636                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1637             </actions>
1638         </permacrud>
1639     </class>
1640
1641     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1642         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1643             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1644             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1645             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1646             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1647             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1648             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1649             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1650         </fields>
1651         <links>
1652             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1653         </links>
1654         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1655             <actions>
1656                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1657                 <retrieve/>
1658                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1659                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1660             </actions>
1661         </permacrud>
1662     </class>
1663
1664     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
1665         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1666             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1667             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1668             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1669             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1670             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1671         </fields>
1672         <links>
1673             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1674             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1675         </links>
1676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1677             <actions>
1678                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1679                     <context link="matchpoint" field="org_unit"/>
1680                 </create>
1681                 <retrieve/>
1682                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1683                     <context link="matchpoint" field="org_unit"/>
1684                 </update>
1685                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1686                     <context link="matchpoint" field="org_unit"/>
1687                 </delete>
1688             </actions>
1689         </permacrud>
1690     </class>
1691
1692     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
1693         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1694             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1695             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1696             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1697         </fields>
1698         <links>
1699             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1700             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1701         </links>
1702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1703             <actions>
1704                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1705                     <context link="limit_set" field="owning_lib"/>
1706                 </create>
1707                 <retrieve/>
1708                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1709                     <context link="limit_set" field="owning_lib"/>
1710                 </update>
1711                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1712                     <context link="limit_set" field="owning_lib"/>
1713                 </delete>
1714             </actions>
1715         </permacrud>
1716     </class>
1717     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
1718         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1719             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1720             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1721             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1722         </fields>
1723         <links>
1724             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1725             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1726         </links>
1727         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1728             <actions>
1729                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1730                     <context link="limit_set" field="owning_lib"/>
1731                 </create>
1732                 <retrieve/>
1733                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1734                     <context link="limit_set" field="owning_lib"/>
1735                 </update>
1736                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1737                     <context link="limit_set" field="owning_lib"/>
1738                 </delete>
1739             </actions>
1740         </permacrud>
1741     </class>
1742
1743     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
1744         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1745             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1746             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1747             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1748             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1749         </fields>
1750         <links>
1751             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1752             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1753         </links>
1754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1755             <actions>
1756                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1757                     <context link="limit_set" field="owning_lib"/>
1758                 </create>
1759                 <retrieve/>
1760                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1761                     <context link="limit_set" field="owning_lib"/>
1762                 </update>
1763                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1764                     <context link="limit_set" field="owning_lib"/>
1765                 </delete>
1766             </actions>
1767         </permacrud>
1768     </class>
1769
1770         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
1771                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1772                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1773                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1774                 </fields>
1775                 <links/>
1776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1777             <actions>
1778                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1779                 <retrieve/>
1780                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1781                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1782             </actions>
1783         </permacrud>
1784         </class>
1785
1786         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
1787                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1788                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1789                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1790                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1791                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1792                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1793                 </fields>
1794                 <links>
1795                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1796                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1797                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1798                 </links>
1799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1800             <actions>
1801                 <create permission="ADMIN_SURVEY">
1802                     <context link="survey" field="owner"/>
1803                 </create>
1804                 <retrieve/>
1805                 <update permission="ADMIN_SURVEY">
1806                     <context link="survey" field="owner"/>
1807                 </update>
1808                 <delete permission="ADMIN_SURVEY">
1809                     <context link="survey" field="owner"/>
1810                 </delete>
1811             </actions>
1812         </permacrud>
1813         </class>
1814         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1815                 <fields oils_persist:primary="id" oils_persist:sequence="">
1816                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1817                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1818                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1819                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1820                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1821                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1822                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1823                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1824                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1825                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1826                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1827                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1828                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1829                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1830                 </fields>
1831                 <links>
1832                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1833                 </links>
1834         </class>
1835         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
1836                 <fields oils_persist:primary="id" oils_persist:sequence="">
1837                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1838                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1839                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1840                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1841                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1842                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1843                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1844                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1845                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1846                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1847                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1848                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1849                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1850                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1851                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1852                 </fields>
1853                 <links>
1854                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1855                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1856                 </links>
1857         </class>
1858         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1859                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1860                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1861                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1862                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1863                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1864                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1865                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1866                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1867                 </fields>
1868                 <links>
1869                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1870                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1871                 </links>
1872         </class>
1873         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
1874                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1875                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1876                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1877                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1878                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1879                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1880                 </fields>
1881                 <links>
1882                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1883                 </links>
1884         </class>
1885         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1886                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1887                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1888                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1889                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1890                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1891                 </fields>
1892                 <links>
1893                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1894                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1895                 </links>
1896         </class>
1897         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
1898                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1899                         <field name="field" reporter:datatype="link"/>
1900                         <field name="id" reporter:datatype="id" />
1901                         <field name="source" reporter:datatype="link"/>
1902                         <field name="value" reporter:datatype="text"/>
1903                 </fields>
1904                 <links>
1905                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1906                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1907                 </links>
1908         </class>
1909         <class id="aihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
1910                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1911                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1912                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1913                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1914                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1915                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1916                 </fields>
1917                 <links>
1918                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1919                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1920                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1921                 </links>
1922         </class>
1923         <class id="ancihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
1924                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1925                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1926                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1927                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1928                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1929                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1930                 </fields>
1931                 <links>
1932                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1933                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1934                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1935                 </links>
1936         </class>
1937         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
1938                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1939                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1940                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1941                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1942                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1943                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1944                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1945                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1946                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1947                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1948                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1949                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1950                 </fields>
1951                 <links>
1952                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1953                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1954                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1955                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1956                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1957                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1958                 </links>
1959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1960             <actions>
1961                 <create permission="TRANSIT_COPY" context_field="owner">
1962                     <context link="target_copy" field="circ_lib"/>
1963                 </create>
1964                 <retrieve/>
1965                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1966                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1967             </actions>
1968         </permacrud>
1969         </class>
1970         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
1971                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1972                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1973                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1974                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1975                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1976                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1977                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1978                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1979                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1980                 </fields>
1981                 <links>
1982                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1983                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1984                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1985                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1986                 </links>
1987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1988             <actions>
1989                 <create permission="ADMIN_SURVEY">
1990                     <context link="survey" field="owner"/>
1991                 </create>
1992                 <retrieve/>
1993                 <update permission="ADMIN_SURVEY">
1994                     <context link="survey" field="owner"/>
1995                 </update>
1996                 <delete permission="ADMIN_SURVEY">
1997                     <context link="survey" field="owner"/>
1998                 </delete>
1999             </actions>
2000         </permacrud>
2001         </class>
2002         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2003                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2004                         <field name="bucket" />
2005                         <field name="id" reporter:datatype="id" />
2006                         <field name="target_copy" reporter:datatype="link"/>
2007                         <field name="create_time" reporter:datatype="timestamp" />
2008                         <field name="pos" reporter:datatype="int" />
2009                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2010                 </fields>
2011                 <links>
2012                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2013                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2014             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2015                 </links>
2016         </class>
2017         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
2018                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2019                         <field name="id" reporter:datatype="id" />
2020                         <field name="item" reporter:datatype="link"/>
2021                         <field name="note" reporter:datatype="text" />
2022                 </fields>
2023                 <links>
2024                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2025                 </links>
2026         </class>
2027
2028         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2029                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2030                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2031                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2032                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2033                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2034                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2035                 </fields>
2036                 <links>
2037                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2038                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2039                 </links>
2040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2041                         <actions>
2042                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2043                                 <retrieve/>
2044                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2045                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2046                         </actions>
2047                 </permacrud>
2048         </class>
2049
2050         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2051                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2052                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2053                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2054                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2055                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2056                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2057                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2058                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2059                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2060                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2061                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2062                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2063                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2064                 </fields>
2065                 <links>
2066                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2067                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2068                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2069                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2070                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2071                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2072                 </links>
2073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2074                         <actions>
2075                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2076                                 <retrieve/>
2077                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2078                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2079                         </actions>
2080                 </permacrud>
2081         </class>
2082
2083         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2084                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2085                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2086                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2087                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2088                 </fields>
2089                 <links>
2090                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2091                 </links>
2092                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2093                         <actions>
2094                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2095                                 <retrieve/>
2096                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2097                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2098                         </actions>
2099                 </permacrud>
2100         </class>
2101
2102         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2103                 <fields oils_persist:primary="code">
2104                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2105                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2106                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2107                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2108                 </fields>
2109                 <links>
2110                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2111                 </links>
2112                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2113                         <actions>
2114                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2115                                 <retrieve/>
2116                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2117                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2118                         </actions>
2119                 </permacrud>
2120         </class>
2121
2122         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
2123                 <fields oils_persist:primary="code">
2124                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2125                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2126                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2127                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2128                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2129                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2130                 </fields>
2131                 <links>
2132                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2133                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2134                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2135                 </links>
2136                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137                         <actions>
2138                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2139                                 <retrieve/>
2140                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2141                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2142                         </actions>
2143                 </permacrud>
2144         </class>
2145
2146     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
2147         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2148             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2149             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2150             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2151         </fields>
2152         <links>
2153             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2154             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2155         </links>
2156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2157             <actions>
2158                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2159                 <retrieve/>
2160                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2161                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2162             </actions>
2163         </permacrud>
2164     </class>
2165
2166         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
2167                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2168                         <field name="active" reporter:datatype="bool"/>
2169                         <field name="create_date" reporter:datatype="timestamp"/>
2170                         <field name="creator" />
2171                         <field name="deleted" reporter:datatype="bool"/>
2172                         <field name="edit_date" reporter:datatype="timestamp"/>
2173                         <field name="editor" />
2174                         <field name="id" reporter:datatype="id" />
2175                         <field name="last_xact_id" />
2176                         <field name="marc" />
2177                         <field name="source" />
2178                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2179                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2180                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2181                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2182                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2183                 </fields>
2184                 <links>
2185                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2186                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2187                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2188                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2189                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2190                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2191                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2192                 </links>
2193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2194                         <actions>
2195                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2196                                 <retrieve/>
2197                                 <update permission="UPDATE_MARC" global_required="true"/>
2198                                 <delete permission="UPDATE_MARC" global_required="true"/>
2199                         </actions>
2200                 </permacrud>
2201         </class>
2202         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2204                         <field name="char_encoding" />
2205                         <field name="id" />
2206                         <field name="record" />
2207                         <field name="record_status" />
2208                         <field name="thesaurus" />
2209                 </fields>
2210                 <links>
2211                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2212                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2213                 </links>
2214         </class>
2215         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2216                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2217                         <field name="id" reporter:datatype="id" />
2218                         <field name="bib" reporter:datatype="link" />
2219                         <field name="authority" reporter:datatype="link" />
2220                 </fields>
2221                 <links>
2222                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2223                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2224                 </links>
2225         </class>
2226         <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
2227                 <fields oils_persist:primary="code" oils_persist:sequence="">
2228                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2229                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2230                 </fields>
2231                 <links/>
2232         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2233             <actions>
2234                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2235                 <retrieve/>
2236                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2237                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2238             </actions>
2239         </permacrud>
2240         </class>
2241         <class id="mccp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2242                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2243                         <field name="accepting_usr" />
2244                         <field name="amount" reporter:datatype="money" />
2245                         <field name="amount_collected" reporter:datatype="money" />
2246                         <field name="approval_code" reporter:datatype="text"/>
2247                         <field name="cash_drawer" reporter:datatype="link"/>
2248                         <field name="cc_first_name" reporter:datatype="text"/>
2249                         <field name="cc_last_name" reporter:datatype="text"/>
2250                         <field name="cc_number" reporter:datatype="text"/>
2251                         <field name="cc_order_number" reporter:datatype="text"/>
2252                         <field name="cc_type" reporter:datatype="text"/>
2253                         <field name="cc_processor" reporter:datatype="text"/>
2254                         <field name="expire_month" reporter:datatype="int" />
2255                         <field name="expire_year" reporter:datatype="int" />
2256                         <field name="id" reporter:datatype="id" />
2257                         <field name="note" reporter:datatype="text"/>
2258                         <field name="payment_ts" reporter:datatype="timestamp"/>
2259                         <field name="xact" reporter:datatype="link"/>
2260                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2261                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2262                 </fields>
2263                 <links>
2264                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2265                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2266                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2267                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2268                 </links>
2269         </class>
2270         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">
2271                 <fields oils_persist:primary="name">
2272                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2273                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2274                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2275                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2276                 </fields>
2277                 <links/>
2278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2279             <actions>
2280                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2281                 <retrieve/>
2282                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2283                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2284             </actions>
2285         </permacrud>
2286         </class>
2287
2288         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2289                 <fields oils_persist:primary="alias">
2290                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2291                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2292                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2293                 </fields>
2294                 <links>
2295                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2296                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2297                 </links>
2298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2299             <actions>
2300                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2301                 <retrieve/>
2302                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2303                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2304             </actions>
2305         </permacrud>
2306         </class>
2307
2308         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2309                 <fields oils_persist:primary="name">
2310                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2311                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2312                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2313                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2314                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2315                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2316                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2317                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2318                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2319                 </fields>
2320                 <links>
2321                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2322                 </links>
2323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2324             <actions>
2325                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2326                 <retrieve/>
2327                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2328                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2329             </actions>
2330         </permacrud>
2331         </class>
2332
2333         <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">
2334                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2335                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2336                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2337                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2338                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2339                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2340                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2341                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2342                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2343                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2344                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2345                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2346                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2347                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2348                 </fields>
2349                 <links>
2350                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2351                 </links>
2352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2353             <actions>
2354                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2355                 <retrieve/>
2356                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2357                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2358             </actions>
2359         </permacrud>
2360         </class>
2361         <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">
2362                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2363                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2364                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2365                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2366                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2367                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2368                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2369                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2370                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2371                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2372                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2373                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2374                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2375                 </fields>
2376                 <links>
2377                 </links>
2378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2379                         <actions>
2380                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2381                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2382                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2383                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2384                         </actions>
2385                 </permacrud>
2386         </class>
2387         <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">
2388                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2389                         <field name="id" reporter:datatype="id" />
2390                         <field name="name" reporter:datatype="text"/>
2391                         <field name="xpath" reporter:datatype="text"/>
2392                         <field name="format" reporter:datatype="link"/>
2393                         <field name="first_word" reporter:datatype="bool" />
2394                 </fields>
2395                 <links/>
2396         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2397             <actions>
2398                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2399                 <retrieve/>
2400                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2401                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2402             </actions>
2403         </permacrud>
2404         </class>
2405         <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">
2406                 <fields oils_persist:primary="code" oils_persist:sequence="">
2407                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2408                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2409                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2410                 </fields>
2411                 <links/>
2412         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2413             <actions>
2414                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2415                 <retrieve/>
2416                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2417                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2418             </actions>
2419         </permacrud>
2420         </class>
2421         <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">
2422                 <fields oils_persist:primary="code" oils_persist:sequence="">
2423                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2424                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2425                 </fields>
2426                 <links/>
2427         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2428             <actions>
2429                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2430                 <retrieve/>
2431                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2432                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2433             </actions>
2434         </permacrud>
2435         </class>
2436     <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">
2437         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2438             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2439             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2440             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2441             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2442         </fields>
2443         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2444             <actions>
2445                 <retrieve/>
2446             </actions>
2447         </permacrud>
2448     </class>
2449         <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">
2450                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2451                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2452                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2453                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2454                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2455                 </fields>
2456                 <links>
2457                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2458                 </links>
2459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2460             <actions>
2461                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2462                 <retrieve/>
2463                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2464                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2465             </actions>
2466         </permacrud>
2467         </class>
2468         <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">
2469                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2470                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2471                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2472                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2473                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2474                 </fields>
2475                 <links>
2476                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2477                 </links>
2478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2479             <actions>
2480                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2481                 <retrieve/>
2482                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2483                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2484             </actions>
2485         </permacrud>
2486         </class>
2487         <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">
2488                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2489                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2490                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2491                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2492                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2493                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2494                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2495                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2496                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2497                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2498                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2499                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2500                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2501                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2502                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2503                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2504                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2505                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2506                 </fields>
2507                 <links>
2508                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2509                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2510                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2511                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2512                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2513                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2514                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2515                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2516                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2517                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2518                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2519                 </links>
2520         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2521             <actions>
2522                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2523                 <retrieve/>
2524                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2525                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2526             </actions>
2527         </permacrud>
2528         </class>
2529         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2530                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2531                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2532                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2533                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2534                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2535                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2536                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2537                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2538                 </fields>
2539                 <links>
2540                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2541                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2542         </links>
2543         </class>
2544         <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">
2545                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2546                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2547                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2548                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2549                 </fields>
2550                 <links>
2551                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2552                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2553                 </links>
2554         </class>
2555         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2556                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2557                         <field name="id" reporter:datatype="id" />
2558                         <field name="value" oils_persist:i18n="true" />
2559                 </fields>
2560                 <links/>
2561         </class>
2562         <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">
2563                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2564                         <field name="balance_owed" reporter:datatype="money" />
2565                         <field name="total_owed" reporter:datatype="money" />
2566                         <field name="total_paid" reporter:datatype="money" />
2567                         <field name="usr" reporter:datatype="link"/>
2568                 </fields>
2569                 <links>
2570                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2571         </links>
2572         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2573             <actions>
2574                 <retrieve permission="VIEW_USER">
2575                     <context link="usr" field="home_ou"/>
2576                 </retrieve>
2577             </actions>
2578         </permacrud>
2579         </class>
2580         <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">
2581                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2582                         <field name="collector" />
2583                         <field name="enter_time" reporter:datatype="timestamp"/>
2584                         <field name="id" reporter:datatype="id" />
2585                         <field name="location" reporter:datatype="link"/>
2586                         <field name="usr" reporter:datatype="link"/>
2587                 </fields>
2588                 <links>
2589                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2590                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2591                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2592                 </links>
2593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2594             <actions>
2595                 <create permission="money.collections_tracker.create" context_field="location"/>
2596                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2597                 <delete permission="money.collections_tracker.create" context_field="location"/>
2598             </actions>
2599         </permacrud>
2600         </class>
2601         <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">
2602                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2603                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2604                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2605                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2606                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2607                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2608                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2609                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2610                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2611                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2612                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2613                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2614                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2615                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2616                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2617                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2618                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2619                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2620                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2621                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2622                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2623                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2624                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2625                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2626                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2627                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2628                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2629                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2630                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2631                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2632                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2633                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2634                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2635                 </fields>
2636                 <links>
2637                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2638                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2639                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2640                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2641                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2642                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2643                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2644                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2645                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2646                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2647                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2648                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2649                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2650                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2651                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2652                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2653                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2654                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2655                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2656                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2657                 </links>
2658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2659             <actions>
2660                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2661                 <retrieve/>
2662                 <update permission="UPDATE_MARC" global_required="true"/>
2663             </actions>
2664         </permacrud>
2665         </class>
2666         <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">
2667                 <fields oils_persist:primary="id">
2668                         <field name="dow_0_close" />
2669                         <field name="dow_0_open" />
2670                         <field name="dow_1_close" />
2671                         <field name="dow_1_open" />
2672                         <field name="dow_2_close" />
2673                         <field name="dow_2_open" />
2674                         <field name="dow_3_close" />
2675                         <field name="dow_3_open" />
2676                         <field name="dow_4_close" />
2677                         <field name="dow_4_open" />
2678                         <field name="dow_5_close" />
2679                         <field name="dow_5_open" />
2680                         <field name="dow_6_close" />
2681                         <field name="dow_6_open" />
2682                         <field name="id" reporter:datatype="id" />
2683                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2684                 </fields>
2685                 <links>
2686                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2687                 </links>
2688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2689             <actions>
2690                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2691                 <retrieve/>
2692                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2693                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2694             </actions>
2695         </permacrud>
2696         </class>
2697         <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">
2698                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2699                         <field name="id" reporter:datatype="id" />
2700                         <field name="record" reporter:datatype="link"/>
2701                         <field name="label" reporter:datatype="text"/>
2702                         <field name="label_sortkey" reporter:datatype="text"/>
2703                 </fields>
2704                 <links>
2705                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2706                 </links>
2707         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2708             <actions>
2709                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2710                 <retrieve/>
2711                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2712                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2713             </actions>
2714         </permacrud>
2715         </class>
2716         <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">
2717                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2718                         <field name="id" reporter:datatype="id" />
2719                         <field name="target_copy" reporter:datatype="link" />
2720                         <field name="part" reporter:datatype="link"/>
2721                 </fields>
2722                 <links>
2723                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2724                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2725                 </links>
2726         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2727             <actions>
2728                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2729                 <retrieve/>
2730                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2731                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2732             </actions>
2733         </permacrud>
2734         </class>
2735         <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">
2736                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2737                         <field name="close_end" reporter:datatype="timestamp" />
2738                         <field name="close_start" reporter:datatype="timestamp" />
2739                         <field name="id" reporter:datatype="id" />
2740                         <field name="org_unit" reporter:datatype="org_unit"/>
2741                         <field name="reason" reporter:datatype="text"/>
2742                 </fields>
2743                 <links>
2744                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2745                 </links>
2746         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2747             <actions>
2748                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2749                 <retrieve/>
2750                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2751                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2752             </actions>
2753         </permacrud>
2754         </class>
2755         <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">
2756                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2757                         <field name="extended" reporter:datatype="interval"/>
2758                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2759                         <field name="max_renewals" reporter:datatype="int" />
2760                         <field name="name" reporter:datatype="text"/>
2761                         <field name="normal" reporter:datatype="interval"/>
2762                         <field name="shrt" reporter:datatype="interval"/>
2763                 </fields>
2764                 <links>
2765                 </links>
2766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2767             <actions>
2768                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2769                 <retrieve/>
2770                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2771                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2772             </actions>
2773         </permacrud>
2774         </class>
2775
2776         <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">
2777                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2778                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2779                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2780             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2781                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2782             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2783                 </fields>
2784                 <links>
2785             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2786                 </links>
2787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2788             <actions>
2789                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2790                 <retrieve/>
2791                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2792                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2793             </actions>
2794                 </permacrud>
2795         </class>
2796
2797         <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">
2798                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2799                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2800                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2801                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2802             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2803                 </fields>
2804                 <links>
2805                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2806                 </links>
2807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2808             <actions>
2809                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2810                 <retrieve/>
2811                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2812                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2813             </actions>
2814                 </permacrud>
2815         </class>
2816
2817         <class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
2818                 <fields oils_persist:primary="id" oils_persist:sequence="">
2819                         <field name="balance_owed" reporter:datatype="money"/>
2820                         <field name="id" reporter:datatype="id" />
2821                         <field name="last_billing_note" reporter:datatype="text"/>
2822                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2823                         <field name="last_billing_type" reporter:datatype="text"/>
2824                         <field name="last_payment_note" reporter:datatype="text"/>
2825                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2826                         <field name="last_payment_type" reporter:datatype="text"/>
2827                         <field name="total_owed" reporter:datatype="money"/>
2828                         <field name="total_paid" reporter:datatype="money"/>
2829                         <field name="usr" reporter:datatype="link"/>
2830                         <field name="xact_finish" reporter:datatype="timestamp" />
2831                         <field name="xact_start" reporter:datatype="timestamp" />
2832                         <field name="xact_type" reporter:datatype="text"/>
2833                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2834                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2835                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2836                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2837                         <field name="billing_location" reporter:datatype="link"/>
2838                 </fields>
2839                 <links>
2840                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2841                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2842                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2843                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2844                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2845                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2846                 </links>
2847         </class>
2848         <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">
2849                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2850                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2851                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2852                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2853                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2854                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2855                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2856                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2857                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2858                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2859                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2860                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2861                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2862                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2863                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2864                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2865                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2866                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2867                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2868                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2869                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2870                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2871                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2872                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2873                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2874                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2875                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2876                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2877                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2878                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2879                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2880                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2881                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2882                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2883                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2884                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2885                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2886                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2887                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2888                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2889                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2890                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2891                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2892                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2893                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2894                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2895                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2896                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2897                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2898                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2899                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2900                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2901                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2902                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2903                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2904                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2905                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2906                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2907                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2908                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2909                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2910                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2911                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2912                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2913                 </fields>
2914                 <links>
2915                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2916                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2917                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2918                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2919                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2920                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2921                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2922                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2923                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2924                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2925                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2926                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2927                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2928                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2929                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2930                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2931                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2932                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2933                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2934                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2935                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2936                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2937                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2938                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2939                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2940                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2941                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2942                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2943                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2944                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2945                 </links>
2946                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2947                         <actions>
2948                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
2949                         </actions>
2950                 </permacrud>
2951         </class>
2952         <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">
2953                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2954                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2955                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2956                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2957                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2958                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2959                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2960                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2961                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2962         </fields>
2963                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2964                         <actions>
2965                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2966                                 <retrieve/>
2967                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2968                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2969                         </actions>
2970                 </permacrud>
2971         </class>
2972         <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">
2973                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
2974                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2975                         <field name="usr" reporter:label="User" reporter:datatype="link" />
2976                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
2977                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
2978         </fields>
2979         <links>
2980                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2981                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
2982                 </links>
2983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2984                         <actions>
2985                                 <retrieve permission="RUN_REPORTS">
2986                                         <context link="usr" field="home_ou" />
2987                                 </retrieve>
2988                         </actions>
2989                 </permacrud>
2990         </class>
2991         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
2992                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
2993                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2994                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
2995                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
2996                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
2997                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
2998                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
2999         </fields>
3000         <links>
3001                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3002                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3003                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3004                 </links>
3005                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3006                         <actions>
3007                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3008                                         <context link="usr" field="home_ou" />
3009                                         <context link="ws" field="owning_lib" />
3010                                 </retrieve>
3011                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3012                                         <context link="usr" field="home_ou" />
3013                                         <context link="ws" field="owning_lib" />
3014                                 </create>
3015                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3016                                         <context link="usr" field="home_ou" />
3017                                         <context link="ws" field="owning_lib" />
3018                                 </update>
3019                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3020                                         <context link="usr" field="home_ou" />
3021                                         <context link="ws" field="owning_lib" />
3022                                 </delete>
3023                         </actions>
3024                 </permacrud>
3025         </class>
3026         <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">
3027                 <fields oils_persist:primary="name">
3028                         <field name="name" reporter:datatype="text"/>
3029                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3030                 </fields>
3031                 <links/>
3032                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3033                         <actions>
3034                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3035                                 <retrieve/>
3036                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3037                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3038                         </actions>
3039                 </permacrud>
3040         </class>
3041         <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">
3042                 <fields oils_persist:primary="name">
3043                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3044                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3045                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
3046                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3047                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
3048                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3049                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3050                 </fields>
3051                 <links>
3052                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3053                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3054                 </links>
3055                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3056                         <actions>
3057                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3058                                 <retrieve/>
3059                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3060                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3061                         </actions>
3062                 </permacrud>
3063         </class>
3064         <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">
3065                 <fields oils_persist:primary="name">
3066                         <field name="name" reporter:datatype="text"/>
3067                         <field name="label" reporter:datatype="text"/>
3068                         <field name="description" reporter:datatype="text"/>
3069                         <field name="datatype" reporter:datatype="text"/>
3070                         <field name="view_perm" reporter:datatype="link"/>
3071                         <field name="update_perm" reporter:datatype="link"/>
3072                         <field name="fm_class" reporter:datatype="text"/>
3073                         <field name="grp" reporter:datatype="link"/>
3074                 </fields>
3075                 <links>
3076                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3077                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3078                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3079                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3080                 </links>
3081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3082                         <actions>
3083                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3084                                 <retrieve/>
3085                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3086                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3087                         </actions>
3088                 </permacrud>
3089         </class>
3090         <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">
3091                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3092                         <field name="id" />
3093                         <field name="name"  reporter:datatype="text"/>
3094                         <field name="org_unit" reporter:datatype="org_unit"/>
3095                         <field name="value"  reporter:datatype="text"/>
3096                 </fields>
3097                 <links>
3098                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3099                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3100                 </links>
3101         </class>
3102         <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">
3103                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3104                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3105                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3106                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3107                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3108                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3109                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3110                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3111                 </fields>
3112                 <links>
3113                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3114                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3115                 </links>
3116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3117             <actions>
3118                 <create permission="CREATE_COPY_NOTE">
3119                     <context link="owning_copy" field="circ_lib"/>
3120                 </create>
3121                 <retrieve permission="VIEW_COPY_NOTES">
3122                     <context link="owning_copy" field="circ_lib"/>
3123                 </retrieve>
3124                 <update permission="UPDATE_COPY_NOTE">
3125                     <context link="owning_copy" field="circ_lib"/>
3126                 </update>
3127                 <delete permission="DELETE_COPY_NOTE">
3128                     <context link="owning_copy" field="circ_lib"/>
3129                 </delete>
3130             </actions>
3131         </permacrud>
3132         </class>
3133         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3134                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3135                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3136                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3137                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3138                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3139                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3140                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3141                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3142                 </fields>
3143                 <links>
3144                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3145                 </links>
3146         </class>
3147         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3148                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3149                         <field name="fingerprint"  reporter:datatype="text"/>
3150                         <field name="id" reporter:datatype="id" />
3151                         <field name="master_record" reporter:datatype="link"/>
3152                         <field name="mods"  reporter:datatype="text"/>
3153                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3154                 </fields>
3155                 <links>
3156                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3157                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3158                 </links>
3159         </class>
3160         <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">
3161                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3162                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3163                         <field name="name"  reporter:datatype="text"/>
3164                 </fields>
3165                 <links/>
3166         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3167             <actions>
3168                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3169                 <retrieve/>
3170                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3171                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3172             </actions>
3173         </permacrud>
3174         </class>
3175         <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">
3176                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3177                         <field name="code"  reporter:datatype="text"/>
3178                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3179                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3180                 </fields>
3181                 <links/>
3182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3183             <actions>
3184                 <create permission="CREATE_PERM" global_required="true"/>
3185                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3186                 <update permission="UPDATE_PERM" global_required="true"/>
3187                 <delete permission="DELETE_PERM" global_required="true"/>
3188             </actions>
3189         </permacrud>
3190         </class>
3191         <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">
3192                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3193                         <field name="id" reporter:datatype="id" />
3194                         <field name="metarecord" reporter:datatype="link"/>
3195                         <field name="source" reporter:datatype="link"/>
3196                 </fields>
3197                 <links>
3198                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3199                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3200                 </links>
3201         </class>
3202         <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">
3203                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3204                         <field name="id" reporter:datatype="id" />
3205                         <field name="field" reporter:datatype="link"/>
3206                         <field name="source" reporter:datatype="link"/>
3207                         <field name="value"  reporter:datatype="text"/>
3208                 </fields>
3209                 <links>
3210                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3211                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3212                 </links>
3213         </class>
3214         <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">
3215                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3216                         <field name="id" reporter:datatype="id" />
3217                         <field name="value" reporter:datatype="text"/>
3218                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3219                 </fields>
3220                 <links>
3221                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3222                 </links>
3223         </class>
3224         <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">
3225                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3226                         <field name="id" reporter:datatype="id" />
3227                         <field name="entry" reporter:datatype="link"/>
3228                         <field name="def" reporter:datatype="link"/>
3229                         <field name="source" reporter:datatype="link"/>
3230                 </fields>
3231                 <links>
3232                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3233                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3234                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3235                 </links>
3236         </class>
3237         <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">
3238                 <oils_persist:source_definition>
3239                         SELECT * FROM metabib.author_field_entry
3240                                                 UNION ALL
3241                         SELECT * FROM metabib.keyword_field_entry
3242                                                 UNION ALL
3243                         SELECT * FROM metabib.identifier_field_entry
3244                                                 UNION ALL
3245                         SELECT * FROM metabib.title_field_entry
3246                                                 UNION ALL
3247                         SELECT * FROM metabib.subject_field_entry
3248                                                 UNION ALL
3249                         SELECT * FROM metabib.series_field_entry
3250                 </oils_persist:source_definition>
3251                 <fields>
3252                         <field name="field" reporter:datatype="link"/>
3253                         <field name="id" reporter:datatype="id" />
3254                         <field name="source" reporter:datatype="link"/>
3255                         <field name="value"  reporter:datatype="text"/>
3256                 </fields>
3257                 <links>
3258                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3259                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3260                 </links>
3261         </class>
3262         <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">
3263                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3264                         <field name="field" reporter:datatype="link"/>
3265                         <field name="id" reporter:datatype="id" />
3266                         <field name="source" reporter:datatype="link"/>
3267                         <field name="value"  reporter:datatype="text"/>
3268                 </fields>
3269                 <links>
3270                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3271                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3272                 </links>
3273         </class>
3274         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3275                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3276                         <field name="accepting_usr" reporter:datatype="link"/>
3277                         <field name="amount" reporter:datatype="money" />
3278                         <field name="amount_collected" reporter:datatype="money" />
3279                         <field name="cash_drawer" reporter:datatype="link"/>
3280                         <field name="id" reporter:datatype="id" />
3281                         <field name="note"  reporter:datatype="text"/>
3282                         <field name="payment_ts" reporter:datatype="timestamp"/>
3283                         <field name="xact" reporter:datatype="link"/>
3284                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3285                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3286                 </fields>
3287                 <links>
3288                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3289                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3290                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3291                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3292                 </links>
3293         </class>
3294         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3295                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3296                         <field name="accepting_usr" reporter:datatype="link"/>
3297                         <field name="amount" reporter:datatype="money" />
3298                         <field name="amount_collected" reporter:datatype="money" />
3299                         <field name="id" reporter:datatype="id" />
3300                         <field name="note"  reporter:datatype="text"/>
3301                         <field name="payment_ts" reporter:datatype="timestamp"/>
3302                         <field name="xact" reporter:datatype="link"/>
3303                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3304                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3305                 </fields>
3306                 <links>
3307                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3308                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3309                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3310                 </links>
3311         </class>
3312         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3313                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3314                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3315                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3316                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3317                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3318                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3319                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3320                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3321                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3322                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3323                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3324                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3325                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3326                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3327                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3328                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3329                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3330                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3331                 </fields>
3332                 <links>
3333                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3334                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3335                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3336                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3337                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3338                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3339                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3340                 </links>
3341         </class>
3342
3343         <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">
3344                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3345                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3346                         <field name="name"  reporter:datatype="text"/>
3347                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3348                         <field name="block_list" reporter:datatype="text"/>
3349                         <field name="staff_alert" reporter:datatype="bool"/>
3350                         <field name="org_depth" reporter:datatype="int"/>
3351                 </fields>
3352                 <links/>
3353         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3354             <actions>
3355                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3356                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3357                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3358                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3359             </actions>
3360         </permacrud>
3361         </class>
3362         <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">
3363                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3364                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3365                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3366                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3367                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3368                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3369                 </fields>
3370                 <links>
3371                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3372                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3373                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3374         </links>
3375         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3376             <actions>
3377                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3378                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3379                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3380                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3381             </actions>
3382         </permacrud>
3383         </class>
3384         <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">
3385                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3386                         <field name="holdable" reporter:datatype="bool"/>
3387                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3388                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3389                         <field name="opac_visible" reporter:datatype="bool"/>
3390             <field name="copy_active" reporter:datatype="bool"/>
3391             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3392                 </fields>
3393                 <links/>
3394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3395             <actions>
3396                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3397                 <retrieve/>
3398                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3399                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3400             </actions>
3401         </permacrud>
3402         </class>
3403         <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">
3404                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3405                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3406                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3407                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3408                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3409                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3410                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3411                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3412                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3413                 </fields>
3414                 <links>
3415                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3416                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3417                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3418                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3419                 </links>
3420                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3421                         <actions>
3422                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3423                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3424                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3425                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3426                         </actions>
3427                 </permacrud>
3428         </class>
3429         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3430                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3431                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3432                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3433                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3434                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3435                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3436                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3437                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3438                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3439                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3440                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3441                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3442                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3443                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3444                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3445                 </fields>
3446                 <links>
3447                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3448                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3449                 </links>
3450         </class>
3451         <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">
3452                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3453                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3454                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3455                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3456                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3457                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3458                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3459                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3460                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3461                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3462                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3463                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3464                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3465                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3466                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3467                 </fields>
3468                 <links>
3469                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3470                 </links>
3471                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3472                         <actions>
3473                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3474                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3475                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3476                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3477                         </actions>
3478                 </permacrud>
3479         </class>
3480
3481
3482         <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">
3483                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3484                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3485                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3486                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3487                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3488                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3489                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3490                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3491                 </fields>
3492                 <links>
3493                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3494                 </links>
3495         </class>
3496
3497         <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">
3498                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3499                         <field name="call_number" />
3500                         <field name="create_date" reporter:datatype="timestamp"/>
3501                         <field name="creator" reporter:datatype="link"/>
3502                         <field name="id" reporter:datatype="id" />
3503                         <field name="pub" reporter:datatype="bool"/>
3504                         <field name="title"  reporter:datatype="text"/>
3505                         <field name="value"  reporter:datatype="text"/>
3506                 </fields>
3507                 <links>
3508                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3509                 </links>
3510         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3511             <actions>
3512                 <create permission="CREATE_VOLUME_NOTE">
3513                     <context link="call_number" field="owning_lib"/>
3514                 </create>
3515                 <retrieve permission="VIEW_VOLUME_NOTES">
3516                     <context link="call_number" field="owning_lib"/>
3517                 </retrieve>
3518                 <update permission="UPDATE_VOLUME_NOTE">
3519                     <context link="call_number" field="owning_lib"/>
3520                 </update>
3521                 <delete permission="DELETE_VOLUME_NOTE">
3522                     <context link="call_number" field="owning_lib"/>
3523                 </delete>
3524             </actions>
3525         </permacrud>
3526         </class>
3527         <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">
3528                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3529                         <field name="create_date" reporter:datatype="timestamp"/>
3530                         <field name="creator" reporter:datatype="link"/>
3531                         <field name="edit_date" reporter:datatype="timestamp"/>
3532                         <field name="editor" reporter:datatype="link"/>
3533                         <field name="id" reporter:datatype="id" />
3534                         <field name="record" reporter:datatype="link"/>
3535                         <field name="value" reporter:datatype="text"/>
3536                 </fields>
3537                 <links>
3538                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3539                 </links>
3540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3541             <actions>
3542                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3543                 <retrieve/>
3544                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3545                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3546             </actions>
3547         </permacrud>
3548         </class>
3549         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3550         <oils_persist:source_definition>
3551 SELECT  usr,
3552         SUM(
3553             CASE
3554                 WHEN (
3555                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3556                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3557                 ) THEN 1
3558                 ELSE 0
3559             END
3560         ) AS out,
3561
3562         SUM(
3563             CASE
3564                 WHEN (
3565                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3566                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3567                 ) THEN 1
3568                 ELSE 0
3569             END
3570         ) AS overdue,
3571
3572         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3573         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3574         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3575   FROM  action.circulation
3576   WHERE checkin_time IS NULL
3577   GROUP BY 1
3578         </oils_persist:source_definition>
3579         <fields oils_persist:primary="usr">
3580             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3581             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3582             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3583             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3584             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3585             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3586         </fields>
3587         <links>
3588             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3589         </links>
3590         </class>
3591         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3592         <oils_persist:source_definition>
3593 SELECT  usr,
3594         ARRAY_TO_STRING(ARRAY_ACCUM(
3595             CASE
3596                 WHEN (
3597                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3598                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3599                 ) THEN id
3600                 ELSE 0
3601             END
3602         ),',') AS out,
3603
3604         ARRAY_TO_STRING(ARRAY_ACCUM(
3605             CASE
3606                 WHEN (
3607                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3608                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3609                 ) THEN id
3610                 ELSE 0
3611             END
3612         ),',') AS overdue,
3613
3614         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3615         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3616         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3617   FROM  action.circulation
3618   WHERE checkin_time IS NULL
3619   GROUP BY 1
3620         </oils_persist:source_definition>
3621         <fields oils_persist:primary="usr">
3622             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3623             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3624             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3625             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3626             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3627             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3628         </fields>
3629         <links>
3630             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3631         </links>
3632         </class>
3633         <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">
3634                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3635                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3636                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3637                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3638                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3639                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3640                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3641                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3642                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3643                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3644                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3645                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3646                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3647                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3648                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3649                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3650                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3651                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3652                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3653                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3654                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3655                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3656                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3657                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3658                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3659                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3660                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3661                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3662                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3663                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3664                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3665                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3666                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3667                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3668                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3669                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3670                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3671                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3672                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3673                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3674                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3675                 </fields>
3676                 <links>
3677                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3678                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3679                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3680                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3681                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3682                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3683                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3684                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3685                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3686                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3687                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3688                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3689                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3690                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3691                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3692                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3693                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3694                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3695                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3696                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3697                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3698                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3699                 </links>
3700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3701                         <actions>
3702                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3703                         </actions>
3704                 </permacrud>
3705         </class>
3706         <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">
3707                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3708                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3709                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3710                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3711                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3712                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3713                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3714                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3715                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3716                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3717                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3718                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3719                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3720                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3721                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3722                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3723                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3724                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3725                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3726                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3727                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3728                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3729                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3730                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3731                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3732                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3733                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3734                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3735                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3736                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3737                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3738                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3739                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3740                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3741                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3742                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3743                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3744                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3745                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3746                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3747                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3748                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3749                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3750                 </fields>
3751                 <links>
3752                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3753                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3754                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3755                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3756                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3757                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3758                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3759                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3760                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3761                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3762                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3763                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3764                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3765                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3766                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3767                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3768                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3769                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3770                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3771                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3772                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3773                 </links>
3774         </class>
3775         <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">
3776                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3777                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3778                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3779                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3780                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3781                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3782                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3783                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3784                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3785                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3786                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3787                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3788                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3789                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3790                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3791                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3792                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3793                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3794                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3795                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3796                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3797                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3798                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3799                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3800                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3801                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3802                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3803                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3804                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3805                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3806                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3807                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3808                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3809                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3810                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3811                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3812                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3813                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3814                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3815                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3816                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3817                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3818                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3819                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3820                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3821                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3822                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3823                 </fields>
3824                 <links>
3825                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3826                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3827                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3828                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3829                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3830                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3831                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3832                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3833                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3834                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3835                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3836                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3837                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3838                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3839                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3840                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3841                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3842                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3843                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3844                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3845                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3846                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3847                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3848                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3849                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3850                 </links>
3851         </class>
3852
3853         <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">
3854                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3855                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3856                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3857                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3858                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3859                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3860                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3861                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3862                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3863                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3864                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3865                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3866                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3867                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3868                 </fields>
3869                 <links>
3870                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3871                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3872                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3873                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3874                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3875                 </links>
3876                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3877                         <actions>
3878                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3879                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3880                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3881                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3882                         </actions>
3883                 </permacrud>
3884         </class>
3885
3886         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3887                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3888                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3889                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3890                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3891                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3892                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3893                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3894                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3895                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3896                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3897                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3898                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3899                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3900                 </fields>
3901                 <links>
3902                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3903                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3904                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3905                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3906                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3907                 </links>
3908                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3909                         <actions>
3910                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3911                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3912                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3913                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3914                         </actions>
3915                 </permacrud>
3916         </class>
3917         
3918         <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">
3919                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3920                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3921                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3922                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3923                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3924                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3925                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3926                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3927                 </fields>
3928                 <links>
3929                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3930                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3931                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3932                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3933                 </links>
3934                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3935                         <actions>
3936                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3937                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3938                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3939                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3940                         </actions>
3941                 </permacrud>
3942         </class>
3943         
3944         <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">
3945                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3946                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3947                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3948                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3949                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3950                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3951                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3952                 </fields>
3953                 <links>
3954                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3955                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3956                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3957                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3958                 </links>
3959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3960                         <actions>
3961                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3962                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3963                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3964                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3965                         </actions>
3966                 </permacrud>
3967         </class>
3968         
3969         <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">
3970                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3971                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3972                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3973                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3974                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3975                 </fields>
3976                 <links>
3977                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3978                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3979                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3980                 </links>
3981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3982                         <actions>
3983                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3984                     <context link="resource" field="owner" />
3985                 </create>
3986                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3987                     <context link="resource" field="owner" />
3988                 </retrieve>
3989                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3990                     <context link="resource" field="owner" />
3991                 </update>
3992                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3993                     <context link="resource" field="owner" />
3994                 </delete>
3995                         </actions>
3996                 </permacrud>
3997         </class>
3998         
3999         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4000                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4001                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4002                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4003                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4004                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4005                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4006                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4007                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4008                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4009                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4010                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4011                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4012                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4013                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4014                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4015                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4016                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4017                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4018                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4019                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4020                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4021                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4022                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4023                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4024                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4025                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4026                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4027                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4028                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4029                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4030                 </fields>
4031                 <links>
4032                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4033                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4034                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4035                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4036                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4037                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4038                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4039                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4040                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4041                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4042                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4043                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4044                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4045                 </links>
4046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4047                         <actions>
4048                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4049                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4050                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4051                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4052                         </actions>
4053                 </permacrud>
4054         </class>
4055         
4056         <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">
4057                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4058                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4059                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4060                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4061                 </fields>
4062                 <links>
4063                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4064                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4065                 </links>
4066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4067                         <actions>
4068                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4069                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4070                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4071                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4072                         </actions>
4073                 </permacrud>
4074         </class>
4075
4076         <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">
4077                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4078                         <field name="bucket" reporter:datatype="link"/>
4079                         <field name="id" reporter:datatype="id" />
4080                         <field name="target_call_number" reporter:datatype="link" />
4081                         <field name="create_time" reporter:datatype="timestamp" />
4082                         <field name="pos" reporter:datatype="int" />
4083                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4084                 </fields>
4085                 <links>
4086                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4087                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4088             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4089                 </links>
4090         </class>
4091         <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">
4092                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4093                         <field name="id" reporter:datatype="id" />
4094                         <field name="item" reporter:datatype="link"/>
4095                         <field name="note" reporter:datatype="text" />
4096                 </fields>
4097                 <links>
4098                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4099                 </links>
4100         </class>
4101         <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">
4102                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4103                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4104                         <field name="btype" reporter:datatype="text"/>
4105                         <field name="id" reporter:datatype="id" />
4106                         <field name="name" reporter:datatype="text"/>
4107                         <field name="description" reporter:datatype="text"/>
4108                         <field name="owner" reporter:datatype="link"/>
4109                         <field name="pub" reporter:datatype="bool"/>
4110                         <field name="create_time" reporter:datatype="timestamp" />
4111                 </fields>
4112                 <links>
4113                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4114                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4115                 </links>
4116         </class>
4117         <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">
4118                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4119                         <field name="id" reporter:datatype="id" />
4120                         <field name="bucket" reporter:datatype="link"/>
4121                         <field name="note" reporter:datatype="text" />
4122                 </fields>
4123                 <links>
4124                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4125                 </links>
4126         </class>
4127         <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">
4128                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4129                         <field name="hold" reporter:datatype="link"/>
4130                         <field name="id" reporter:datatype="id" />
4131                         <field name="target_copy" reporter:datatype="link"/>
4132                         <field name="proximity" reporter:datatype="number"/>
4133                 </fields>
4134                 <links>
4135                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4136                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4137                 </links>
4138         </class>
4139         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4140                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4141                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4142                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4143                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4144                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4145                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4146                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4147                 </fields>
4148                 <links>
4149                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4150                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4151                 </links>
4152         </class>
4153         <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">
4154                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4155                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4156                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4157                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4158                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4159                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4160                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4161                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4162                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4163                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4164                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4165                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4166                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4167                 </fields>
4168                 <links>
4169                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4170                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4171                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4172                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4173                 </links>
4174         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4175             <actions>
4176                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4177                 <retrieve/>
4178                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4179                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4180             </actions>
4181         </permacrud>
4182         </class>
4183         <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">
4184                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4185                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4186                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4187                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4188                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4189             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4190             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4191             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4192                 </fields>
4193                 <links>
4194                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4195                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4196                 </links>
4197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4198             <actions>
4199                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4200                 <retrieve/>
4201                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4202                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4203             </actions>
4204         </permacrud>
4205         </class>
4206         <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">
4207                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4208                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4209             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4210             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4211                 </fields>
4212                 <links>
4213                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4214                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4215                 </links>
4216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4217             <actions>
4218                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4219                                         <context link="lgroup" field="owner" />
4220                 </create>
4221                 <retrieve/>
4222                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4223                                         <context link="lgroup" field="owner" />
4224                 </update>
4225                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4226                                         <context link="lgroup" field="owner" />
4227                 </delete>
4228             </actions>
4229         </permacrud>
4230         </class>
4231
4232     <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">
4233         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4234             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4235             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4236             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4237             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4238         </fields>
4239         <links>
4240             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4241             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4242         </links>
4243         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4244             <actions>
4245                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4246                 <retrieve/>
4247                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4248                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4249             </actions>
4250         </permacrud>
4251     </class>
4252
4253         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4254                 <fields>
4255                         <field name="sre_id" oils_persist:virtual="true" />
4256                         <field name="location" oils_persist:virtual="true" />
4257                         <field name="owning_lib" oils_persist:virtual="true" />
4258                         <field name="basic_holdings" oils_persist:virtual="true" />
4259                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4260                         <field name="supplement_holdings" oils_persist:virtual="true" />
4261                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4262                         <field name="index_holdings" oils_persist:virtual="true" />
4263                         <field name="index_holdings_add" oils_persist:virtual="true" />
4264                         <field name="online" oils_persist:virtual="true" />
4265                         <field name="missing" oils_persist:virtual="true" />
4266                         <field name="incomplete" oils_persist:virtual="true" />
4267                 </fields>
4268         </class>
4269
4270         <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">
4271                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4272                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4273                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4274                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4275                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4276                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4277                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4278                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4279                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4280                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4281                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4282                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4283                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4284                 </fields>
4285                 <links>
4286                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4287                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4288                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4289                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4290                 </links>
4291                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4292                         <actions>
4293                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4294                                 <retrieve/>
4295                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4296                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4297                         </actions>
4298                 </permacrud>
4299         </class>
4300
4301         <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">
4302                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4303                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4304                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4305                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4306                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4307                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4308                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4309                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4310                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4311                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4312                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4313                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4314                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4315                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4316                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4317                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4318                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4319                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4320                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4321                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4322                 </fields>
4323                 <links>
4324                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4325                 </links>
4326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4327                         <actions>
4328                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4329                                         <context link="subscription" field="owning_lib" />
4330                                 </create>
4331                                 <retrieve />
4332                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4333                                         <context link="subscription" field="owning_lib" />
4334                                 </update>
4335                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4336                                         <context link="subscription" field="owning_lib" />
4337                                 </delete>
4338                         </actions>
4339                 </permacrud>
4340         </class>
4341
4342         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4343                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4344                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4345                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4346                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4347                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4348                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4349                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4350                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4351                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4352                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4353                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4354                 </fields>
4355                 <links>
4356                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4357                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4358                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4359                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4360                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4361                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4362                 </links>
4363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4364                         <actions>
4365                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4366                                 <retrieve />
4367                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4368                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4369                         </actions>
4370                 </permacrud>
4371         </class>
4372
4373         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4374                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4375                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4376                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4377                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4378                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4379                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4380                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4381                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4382                 </fields>
4383                 <links>
4384                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4385                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4386                 </links>
4387         </class>
4388
4389         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4390                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4391                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4392                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4393                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4394                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4395                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4396                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4397                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4398                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4399                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4400                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4401                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4402                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4403                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4404                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4405                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4406                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4407                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4408                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4409                 </fields>
4410                 <links>
4411                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4412                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4413                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4414                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4415                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4416                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4417                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4418                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4419                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4420                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4421                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4422                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4423                 </links>
4424                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4425                         <actions>
4426                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4427                                 <retrieve />
4428                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4429                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4430                         </actions>
4431                 </permacrud>
4432         </class>
4433
4434         <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">
4435                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4436                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4437                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4438                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4439                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4440                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4441                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4442                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4443                 </fields>
4444                 <links>
4445                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4446                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4447                 </links>
4448                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4449                         <actions>
4450                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4451                                         <context link="distribution" field="holding_lib" />
4452                                 </create>
4453                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4454                                         <context link="distribution" field="holding_lib" />
4455                                 </retrieve>
4456                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4457                                         <context link="distribution" field="holding_lib" />
4458                                 </update>
4459                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4460                                         <context link="distribution" field="holding_lib" />
4461                                 </delete>
4462                         </actions>
4463                 </permacrud>
4464         </class>
4465
4466         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4467                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4468                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4469                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4470                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4471                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4472                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4473                 </fields>
4474                 <links>
4475                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4476                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4477                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4478                 </links>
4479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4480                         <actions>
4481                                 <create permission="ADMIN_SERIAL_STREAM">
4482                                         <context link="distribution" field="holding_lib" />
4483                                 </create>
4484                                 <retrieve />
4485                                 <update permission="ADMIN_SERIAL_STREAM">
4486                                         <context link="distribution" field="holding_lib" />
4487                                 </update>
4488                                 <delete permission="ADMIN_SERIAL_STREAM">
4489                                         <context link="distribution" field="holding_lib" />
4490                                 </delete>
4491                         </actions>
4492                 </permacrud>
4493         </class>
4494
4495         <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">
4496                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4497                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4498                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4499                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4500                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4501                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4502                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4503                 </fields>
4504                 <links>
4505                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4506                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4507                 </links>
4508                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4509                         <actions>
4510                                 <create permission="ADMIN_SERIAL_STREAM">
4511                                         <context link="stream" jump="distribution" field="holding_lib" />
4512                                 </create>
4513                                 <retrieve permission="RECEIVE_SERIAL">
4514                                         <context link="stream" jump="distribution" field="holding_lib" />
4515                                 </retrieve>
4516                                 <update permission="ADMIN_SERIAL_STREAM">
4517                                         <context link="stream" jump="distribution" field="holding_lib" />
4518                                 </update>
4519                                 <delete permission="ADMIN_SERIAL_STREAM">
4520                                         <context link="stream" jump="distribution" field="holding_lib" />
4521                                 </delete>
4522                         </actions>
4523                 </permacrud>
4524         </class>
4525
4526         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4527                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4528                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4529                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4530                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4531                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4532                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4533                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4534                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4535                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4536                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4537                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4538                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4539                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4540                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4541                 </fields>
4542                 <links>
4543                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4544                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4545                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4546                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4547                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4548                 </links>
4549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4550                         <actions>
4551                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4552                                         <context link="subscription" field="owning_lib" />
4553                                 </create>
4554                                 <retrieve/>
4555                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4556                                         <context link="subscription" field="owning_lib" />
4557                                 </update>
4558                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4559                                         <context link="subscription" field="owning_lib" />
4560                                 </delete>
4561                         </actions>
4562                 </permacrud>
4563         </class>
4564
4565         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4566                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4567                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4568                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4569                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4570                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4571                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4572                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4573                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4574                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4575                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4576                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4577                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4578                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4579                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4580                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4581                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4582                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4583                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4584                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4585                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4586                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4587                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4588                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4589                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4590                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4591                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4592                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4593                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4594                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4595                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4596                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4597                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4598                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4599                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4600                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4601                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4602                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4603                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4604                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4605                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4606                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4607                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4608                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4609                 </fields>
4610                 <links>
4611                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4612                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4613                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4614                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4615                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4616                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4617                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4618                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4619                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4620                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4621                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4622                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4623                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4624                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4625                 </links>
4626                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4627                         <actions>
4628                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4629                                 <retrieve/>
4630                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4631                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4632                         </actions>
4633                 </permacrud>
4634         </class>
4635
4636         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4637                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4638                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4639                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4640                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4641                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4642                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4643                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4644                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4645                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4646                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4647                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4648                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4649                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4650                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4651                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4652                 </fields>
4653                 <links>
4654                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4655                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4656                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4657                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4658                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4659                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4660                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4661                 </links>
4662                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4663                         <actions>
4664                                 <create permission="ADMIN_SERIAL_ITEM">
4665                                         <context link="stream" jump="distribution" field="holding_lib" />
4666                                 </create>
4667                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4668                                         <context link="stream" jump="distribution" field="holding_lib" />
4669                                 </retrieve>
4670                                 <update permission="ADMIN_SERIAL_ITEM">
4671                                         <context link="stream" jump="distribution" field="holding_lib" />
4672                                 </update>
4673                                 <delete permission="ADMIN_SERIAL_ITEM">
4674                                         <context link="stream" jump="distribution" field="holding_lib" />
4675                                 </delete>
4676                         </actions>
4677                 </permacrud>
4678         </class>
4679
4680         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4681                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4682                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4683                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4684                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4685                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4686                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4687                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4688                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4689                 </fields>
4690                 <links>
4691                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4692                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4693                 </links>
4694                 <!-- Not available via PCRUD at this time -->
4695         </class>
4696         <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">
4697                 <fields>
4698                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4699                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4700                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4701                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4702                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4703                 </fields>
4704                 <links>
4705                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4706                 </links>
4707         </class>
4708         <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">
4709                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4710                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4711                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4712                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4713                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4714                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4715                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4716                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4717                 </fields>
4718                 <links>
4719                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4720                 </links>
4721         </class>
4722         <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">
4723                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4724                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4725                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4726                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4727                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4728                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4729                 </fields>
4730                 <links>
4731                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4732                 </links>
4733                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4734                         <actions>
4735                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4736                                         <context link="distribution" field="holding_lib" />
4737                                 </create>
4738                                 <retrieve/>
4739                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4740                                         <context link="distribution" field="holding_lib" />
4741                                 </update>
4742                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4743                                         <context link="distribution" field="holding_lib" />
4744                                 </delete>
4745                         </actions>
4746                 </permacrud>
4747         </class>
4748
4749         <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">
4750                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4751                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4752                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4753                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4754                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4755                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4756                 </fields>
4757                 <links>
4758                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4759                 </links>
4760                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4761                         <actions>
4762                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4763                                         <context link="distribution" field="holding_lib" />
4764                                 </create>
4765                                 <retrieve/>
4766                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4767                                         <context link="distribution" field="holding_lib" />
4768                                 </update>
4769                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4770                                         <context link="distribution" field="holding_lib" />
4771                                 </delete>
4772                         </actions>
4773                 </permacrud>
4774         </class>
4775
4776         <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">
4777                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4778                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4779                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4780                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4781                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4782                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4783                 </fields>
4784                 <links>
4785                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4786                 </links>
4787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4788                         <actions>
4789                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4790                                         <context link="distribution" field="holding_lib" />
4791                                 </create>
4792                                 <retrieve/>
4793                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4794                                         <context link="distribution" field="holding_lib" />
4795                                 </update>
4796                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4797                                         <context link="distribution" field="holding_lib" />
4798                                 </delete>
4799                         </actions>
4800                 </permacrud>
4801         </class>
4802
4803         <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">
4804                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4805                         <field name="id" reporter:datatype="id" />
4806                         <field name="owning_copy" reporter:datatype="link"/>
4807                         <field name="stat_cat" reporter:datatype="link"/>
4808                         <field name="stat_cat_entry" reporter:datatype="link"/>
4809                 </fields>
4810                 <links>
4811                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4812                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4813                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4814                 </links>
4815         </class>
4816         <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">
4817                 <fields oils_persist:primary="code">
4818                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4819                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4820                 </fields>
4821                 <links/>
4822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4823             <actions>
4824                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4825                 <retrieve/>
4826                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4827                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4828             </actions>
4829         </permacrud>
4830         </class>
4831         <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">
4832                 <fields oils_persist:primary="code">
4833                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4834                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4835                 </fields>
4836                 <links/>
4837         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4838             <actions>
4839                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4840                 <retrieve/>
4841                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4842                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4843             </actions>
4844         </permacrud>
4845         </class>
4846         <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">
4847                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4848                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4849                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4850                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4851                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4852                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4853                 </fields>
4854                 <links>
4855             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4856         </links>
4857         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4858             <actions>
4859                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4860                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4861                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4862                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4863             </actions>
4864         </permacrud>
4865         </class>
4866         <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">
4867                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4868                         <field name="id" reporter:datatype="id" />
4869                         <field name="name" reporter:datatype="text"/>
4870                 </fields>
4871                 <links/>
4872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4873             <actions>
4874                 <create permission="CREATE_LASSO" global_required="true"/>
4875                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4876                 <update permission="UPDATE_LASSO" global_required="true"/>
4877                 <delete permission="DELETE_LASSO" global_required="true"/>
4878             </actions>
4879         </permacrud>
4880         </class>
4881         <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">
4882                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4883                         <field name="id" reporter:datatype="id" />
4884                         <field name="lasso" reporter:datatype="link"/>
4885                         <field name="org_unit" reporter:datatype="org_unit"/>
4886                 </fields>
4887                 <links>
4888                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4889                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4890                 </links>
4891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4892             <actions>
4893                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4894                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4895                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4896                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4897             </actions>
4898         </permacrud>
4899         </class>
4900         <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">
4901                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
4902                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4903                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
4904                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
4905                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
4906                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
4907                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
4908                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
4909                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
4910                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
4911                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
4912                 </fields>
4913                 <links>
4914                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4915                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4916                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4917                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
4918                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
4919                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4920                 </links>
4921         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4922             <actions>
4923                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4924                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4925                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4926                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4927             </actions>
4928         </permacrud>
4929         </class>
4930         <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">
4931                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4932                         <field name="id" reporter:datatype="id" />
4933                         <field name="from_org" reporter:datatype="org_unit"/>
4934                         <field name="to_org" reporter:datatype="org_unit"/>
4935                         <field name="prox" reporter:datatype="int" />
4936                 </fields>
4937                 <links>
4938                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4939                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4940                 </links>
4941         </class>
4942         <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">
4943                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4944                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4945                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4946                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4947                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4948                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4949                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4950                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4951                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4952                 </fields>
4953                 <links/>
4954         </class>
4955         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4956                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4957                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4958                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4959                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4960                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4961                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4962                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4963                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4964                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4965                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4966                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4967                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4968                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4969                 </fields>
4970                 <links>
4971                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4972                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4973                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4974                 </links>
4975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4976             <actions>
4977                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4978                 <retrieve/>
4979                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4980                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4981             </actions>
4982         </permacrud>
4983         </class>
4984         <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">
4985                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4986                         <field name="address_type"  reporter:datatype="text"/>
4987                         <field name="city"  reporter:datatype="text"/>
4988                         <field name="country"  reporter:datatype="text"/>
4989                         <field name="county"  reporter:datatype="text"/>
4990                         <field name="id" reporter:datatype="id" />
4991                         <field name="org_unit" reporter:datatype="org_unit"/>
4992                         <field name="post_code"  reporter:datatype="text"/>
4993                         <field name="state"  reporter:datatype="text"/>
4994                         <field name="street1"  reporter:datatype="text"/>
4995                         <field name="street2"  reporter:datatype="text"/>
4996                         <field name="valid" reporter:datatype="bool"/>
4997                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4998                 </fields>
4999                 <links>
5000                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5001                 </links>
5002         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5003             <actions>
5004                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5005                 <retrieve/>
5006                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5007                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5008             </actions>
5009         </permacrud>
5010         </class>
5011         <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">
5012                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5013                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5014                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5015                         <field name="query_text" reporter:datatype="text"/>
5016                 </fields>
5017         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5018             <actions>
5019                 <retrieve/>
5020             </actions>
5021         </permacrud>
5022         </class>
5023
5024         <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">
5025                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5026                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5027                         <field name="owner" reporter:datatype="org_unit"/>
5028                         <field name="code" reporter:datatype="text"/>
5029                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5030                         <field name="create_date" reporter:datatype="timestamp"/>
5031                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5032                 </fields>
5033                 <links>
5034                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5035                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5036                 </links>
5037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5038             <actions>
5039                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5040                 <retrieve/>
5041                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5042                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5043             </actions>
5044         </permacrud>
5045         </class>
5046         <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">
5047                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5048                         <field name="id" reporter:datatype="id"/>
5049                         <field name="grp" reporter:datatype="link"/>
5050                         <field name="pos" reporter:datatype="int"/>
5051                         <field name="query" reporter:datatype="link"/>
5052                 </fields>
5053                 <links>
5054                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5055                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5056                 </links>
5057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5058             <actions>
5059                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5060                     <context link="grp" field="owner"/>
5061                 </create>
5062                 <retrieve/>
5063                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5064                     <context link="grp" field="owner"/>
5065                 </update>
5066                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5067                     <context link="grp" field="owner"/>
5068                 </delete>
5069             </actions>
5070         </permacrud>
5071         </class>
5072
5073         <!-- A note: Please update alhr and ahopl when updating ahr -->
5074         <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">
5075                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5076                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5077                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5078                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5079                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5080                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5081                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5082                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5083                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5084                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5085                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5086                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5087                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5088                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5089                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5090                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5091                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5092                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5093                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5094                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5095                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5096                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5097                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5098                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5099                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5100                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5101                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5102                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5103                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5104                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5105                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5106                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5107                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5108                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5109                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5110                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5111                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5112                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5113                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5114                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5115                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5116                 </fields>
5117                 <links>
5118                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5119                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5120                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5121                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5122                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5123                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5124                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5125                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5126                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5127                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5128                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5129                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5130                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5131                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5132                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5133                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5134                 </links>
5135                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5136                         <actions>
5137                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5138                         </actions>
5139                 </permacrud>
5140         </class>
5141         <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">
5142                 <oils_persist:source_definition><![CDATA[
5143                 SELECT
5144                         ahr.*,
5145                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5146                                 copy_location_order_position,
5147                         CASE WHEN au.alias IS NOT NULL THEN
5148                                 au.alias
5149                         ELSE
5150                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5151                                         COALESCE(au.family_name, ''),
5152                                         COALESCE(au.suffix, ''),
5153                                         ', ',
5154                                         COALESCE(au.prefix, ''),
5155                                         COALESCE(au.first_given_name, ''),
5156                                         COALESCE(au.second_given_name, '')
5157                                 ], ' '), E'\\s+,', ',')
5158                         END AS usr_display_name,
5159                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5160                                 AS call_number_label,
5161                         siss.label AS issuance_label,
5162                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5163                         ahcm_1.copy_count AS potential_copies
5164                 FROM action.hold_request ahr
5165                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5166                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5167                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5168                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5169                 JOIN actor.usr au ON (au.id = ahr.usr)
5170                 JOIN (
5171                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5172                         FROM asset.copy_location
5173                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5174                 LEFT JOIN actor.usr_standing_penalty ausp 
5175                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5176                 LEFT JOIN config.standing_penalty csp
5177                         ON (
5178                                 csp.id = ausp.standing_penalty AND 
5179                                 csp.block_list LIKE '%CAPTURE%' AND (
5180                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5181                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5182                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5183                                         )
5184                                 )
5185                         )
5186                 JOIN (
5187                         SELECT COUNT(target_copy) AS copy_count, hold
5188                         FROM action.hold_copy_map
5189                         GROUP BY 2
5190                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5191                 LEFT JOIN serial.issuance siss
5192                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5193                 LEFT JOIN asset.copy_location_order acplo
5194                         ON (acp.location = acplo.location AND
5195                                 acp.circ_lib = acplo.org)
5196                 WHERE
5197                         ahr.capture_time IS NULL AND
5198                         ahr.cancel_time IS NULL AND
5199                         csp.id IS NULL AND
5200                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5201                 ]]></oils_persist:source_definition>
5202                 <fields oils_persist:primary="id">
5203                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5204                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5205                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5206                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5207                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5208                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5209                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5210                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5211                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5212                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5213                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5214                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5215                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5216                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5217                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5218                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5219                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5220                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5221                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5222                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5223                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5224                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5225                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5226                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5227                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5228                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5229                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5230                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5231                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5232                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5233                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5234                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5235                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5236                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5237                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5238                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5239                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5240                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5241                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5242                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5243                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5244                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5245                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5246                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5247                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5248                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5249                 </fields>
5250                 <links>
5251                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5252                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5253                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5254                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5255                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5256                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5257                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5258                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5259                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5260                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5261                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5262                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5263                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5264                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5265                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5266                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5267                 </links>
5268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5269                         <actions>
5270                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5271                         </actions>
5272                 </permacrud>
5273         </class>
5274         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5275                 <oils_persist:source_definition>
5276                         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)
5277                 </oils_persist:source_definition>
5278                 <fields oils_persist:primary="id">
5279                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5280                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5281                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5282                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5283                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5284                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5285                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5286                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5287                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5288                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5289                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5290                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5291                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5292                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5293                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5294                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5295                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5296                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5297                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5298                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5299                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5300                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5301                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5302                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5303                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5304                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5305                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5306                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5307                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5308                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5309                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5310                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5311                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5312                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5313                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5314                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5315                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5316                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5317                 </fields>
5318                 <links>
5319                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5320                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5321                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5322                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5323                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5324                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5325                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5326                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5327                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5328                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5329                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5330                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5331                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5332                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5333                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5334                 </links>
5335         </class>
5336
5337         <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">
5338                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5339                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5340                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5341                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5342                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5343                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5344                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5345                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5346                 </fields>
5347                 <links>
5348                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5349                 </links>
5350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5351                         <actions>
5352                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5353                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5354                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5355                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5356                         </actions>
5357                 </permacrud>
5358         </class>
5359         <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">
5360                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5361                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5362                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5363                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5364                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5365                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5366                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5367                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5368                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5369                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5370                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5371                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5372                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5373                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5374                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5375                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5376                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5377                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5378                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5379                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5380                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5381                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5382                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5383                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5384                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5385                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5386                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5387                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5388                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5389                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5390                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5391                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5392                 </fields>
5393                 <links>
5394                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5395                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5396                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5397                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5398                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5399                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5400                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5401                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5402                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5403                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5404                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5405                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5406                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5407                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5408                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5409                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5410                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5411                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5412                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5413                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5414                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5415                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5416                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5417                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5418                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5419                 </links>
5420         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5421             <actions>
5422                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5423                 <retrieve />
5424                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5425                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5426             </actions>
5427         </permacrud>
5428         </class>
5429         <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">
5430                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5431                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5432                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5433                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5434                 </fields>
5435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5436                         <actions>
5437                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5438                                 <retrieve/>
5439                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5440                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5441                         </actions>
5442                 </permacrud>
5443         </class>
5444         <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">
5445                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5446                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5447                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5448                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5449                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5450                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5451                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5452                 </fields>
5453                 <links>
5454                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5455                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5456                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5457                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5458                 </links>
5459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5460                         <actions>
5461                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5462                                 <retrieve/>
5463                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5464                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5465                         </actions>
5466                 </permacrud>
5467         </class>
5468         <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">
5469                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5470                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5471                         <field name="btype" reporter:datatype="text"/>
5472                         <field name="id" reporter:datatype="id" />
5473                         <field name="name"  reporter:datatype="text"/>
5474                         <field name="description" reporter:datatype="text"/>
5475                         <field name="owner" reporter:datatype="link"/>
5476                         <field name="pub" reporter:datatype="bool"/>
5477                         <field name="create_time" reporter:datatype="timestamp" />
5478                 </fields>
5479                 <links>
5480                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5481                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5482                 </links>
5483         </class>
5484         <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">
5485                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5486                         <field name="id" reporter:datatype="id" />
5487                         <field name="bucket" reporter:datatype="link"/>
5488                         <field name="note" reporter:datatype="text" />
5489                 </fields>
5490                 <links>
5491                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5492                 </links>
5493         </class>
5494         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5495                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5496                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5497                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5498                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5499                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5500                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5501                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5502                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5503                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5504                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5505                 </fields>
5506                 <links>
5507                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5508                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5509                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5510                 </links>
5511         </class>
5512         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5513                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5514                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5515                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5516                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5517                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5518                 </fields>
5519                 <links>
5520                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5521                 </links>
5522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5523                         <actions>
5524                                 <retrieve permission="VIEW_USER">
5525                                         <context link="usr" field="home_ou" />
5526                                 </retrieve>
5527                         </actions>
5528                 </permacrud>
5529         </class>
5530     <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">
5531         <fields oils_persist:primary="field">
5532             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5533             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5534             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5535         </fields>
5536         <links/>
5537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5538             <actions>
5539                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5540                 <retrieve />
5541                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5542                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5543             </actions>
5544         </permacrud>
5545     </class>
5546         <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">
5547                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5548                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5549                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5550                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5551                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5552                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5553                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5554                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5555                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5556                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5557                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5558                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5559                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5560                 </fields>
5561                 <links>
5562                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5563                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5564                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5565                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5566                 </links>
5567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5568             <actions>
5569                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5570                 <retrieve />
5571                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5572                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5573             </actions>
5574         </permacrud>
5575         </class>
5576         <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">
5577                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5578                         <field name="field" reporter:datatype="link"/>
5579                         <field name="id" reporter:datatype="id" />
5580                         <field name="source" reporter:datatype="link"/>
5581                         <field name="value"  reporter:datatype="text"/>
5582                 </fields>
5583                 <links>
5584                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5585                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5586                 </links>
5587         </class>
5588         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5589                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5590                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5591                         <field name="btype" reporter:datatype="text"/>
5592                         <field name="id" reporter:datatype="id" />
5593                         <field name="name"  reporter:datatype="text"/>
5594                         <field name="description" reporter:datatype="text"/>
5595                         <field name="owner" reporter:datatype="link"/>
5596                         <field name="pub" reporter:datatype="bool"/>
5597                         <field name="create_time" reporter:datatype="timestamp" />
5598                 </fields>
5599                 <links>
5600                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5601                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5602                 </links>
5603         </class>
5604         <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">
5605                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5606                         <field name="id" reporter:datatype="id" />
5607                         <field name="bucket" reporter:datatype="link"/>
5608                         <field name="note" reporter:datatype="text" />
5609                 </fields>
5610                 <links>
5611                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5612                 </links>
5613         </class>
5614         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5615                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5616                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5617                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5618                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5619                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5620                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5621                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5622                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5623                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5624                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5625                 </fields>
5626                 <links>
5627                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5628                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5629                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5630                 </links>
5631         </class>
5632         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5633                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5634                         <field name="id" reporter:datatype="id" />
5635                         <field name="ind1" />
5636                         <field name="ind2" />
5637                         <field name="record" />
5638                         <field name="subfield" />
5639                         <field name="tag" />
5640                         <field name="value" />
5641                 </fields>
5642                 <links>
5643                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5644                 </links>
5645         </class>
5646         <class id="cnct" controller="open-ils.cstore" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
5647                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5648                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5649                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5650                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5651                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5652                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5653                 </fields>
5654                 <links>
5655                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5656                 </links>
5657         </class>
5658         <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">
5659                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5660                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5661                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5662                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5663                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5664                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5665                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5666                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5667                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5668                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5669                 </fields>
5670                 <links>
5671                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5672                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5673                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5674                 </links>
5675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5676             <actions>
5677                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5678                 <retrieve/>
5679                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5680                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5681             </actions>
5682         </permacrud>
5683         </class>
5684         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5685                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5686                         <field name="create_date" reporter:datatype="timestamp"/>
5687                         <field name="creator" reporter:datatype="link"/>
5688                         <field name="edit_date" reporter:datatype="timestamp"/>
5689                         <field name="editor" reporter:datatype="link"/>
5690                         <field name="id" reporter:datatype="id" />
5691                         <field name="pub" reporter:datatype="bool"/>
5692                         <field name="record" reporter:datatype="link"/>
5693                         <field name="value"  reporter:datatype="text"/>
5694                 </fields>
5695                 <links>
5696                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5697                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5698                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5699                 </links>
5700         </class>
5701         <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">
5702                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5703                         <field name="balance_owed" reporter:datatype="money" />
5704                         <field name="total_owed" reporter:datatype="money" />
5705                         <field name="total_paid" reporter:datatype="money" />
5706                         <field name="usr" reporter:datatype="link"/>
5707                 </fields>
5708                 <links>
5709                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5710                 </links>
5711         </class>
5712         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5713                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5714                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5715                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5716                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5717                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5718                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5719                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5720                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5721                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5722                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5723                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5724                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5725                 </fields>
5726                 <links>
5727                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5728                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5729                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5730                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5731                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5732                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5733                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5734                 </links>
5735         </class>
5736         <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">
5737                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5738                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5739                         <field name="quality" reporter:datatype="int" />
5740                         <field name="source" reporter:datatype="text"/>
5741                         <field name="transcendant" reporter:datatype="bool"/>
5742                         <field name="can_have_copies" reporter:datatype="bool"/>
5743                 </fields>
5744                 <links/>
5745         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5746             <actions>
5747                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5748                 <retrieve/>
5749                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5750                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5751             </actions>
5752         </permacrud>
5753         </class>
5754         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5755                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5756                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5757                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5758                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5759                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5760                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5761                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5762                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5763                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5764                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5765                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5766                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5767                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5768                 </fields>
5769                 <links>
5770                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5771                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5772                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5773                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5774                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5775                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5776                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5777                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5778                 </links>
5779         </class>
5780         <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">
5781                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5782                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5783                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5784                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5785                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5786                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5787                 </fields>
5788                 <links>
5789                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5790                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5791                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5792                 </links>
5793         </class>
5794         <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">
5795                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5796                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5797                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5798                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5799                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5800                 </fields>
5801                 <links>
5802                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5803                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5804                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5805                 </links>
5806         </class>
5807         <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">
5808                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5809                         <field name="bucket" reporter:datatype="link"/>
5810                         <field name="id" reporter:datatype="id" />
5811                         <field name="target_user" reporter:datatype="link"/>
5812                         <field name="create_time" reporter:datatype="timestamp" />
5813                         <field name="pos" reporter:datatype="int" />
5814                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5815                 </fields>
5816                 <links>
5817                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5818                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5819             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5820                 </links>
5821         </class>
5822         <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">
5823                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5824                         <field name="id" reporter:datatype="id" />
5825                         <field name="item" reporter:datatype="link"/>
5826                         <field name="note" reporter:datatype="text" />
5827                 </fields>
5828                 <links>
5829                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5830                 </links>
5831         </class>
5832         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5833                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5834                         <field name="balance_owed" reporter:datatype="money" />
5835                         <field name="total_owed" reporter:datatype="money" />
5836                         <field name="total_paid" reporter:datatype="money" />
5837                         <field name="usr" reporter:datatype="link"/>
5838                 </fields>
5839                 <links>
5840                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5841                 </links>
5842         </class>
5843         <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">
5844                 <fields oils_persist:primary="code" oils_persist:sequence="">
5845                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5846                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5847                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5848                 </fields>
5849                 <links/>
5850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5851             <actions>
5852                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5853                 <retrieve/>
5854                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5855                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5856             </actions>
5857         </permacrud>
5858         </class>
5859         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5860                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5861                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5862                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5863                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5864                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5865                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5866                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5867                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5868                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5869                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5870                 </fields>
5871                 <links>
5872                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5873                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5874                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5875                 </links>
5876         </class>
5877         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5878                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5879                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5880                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5881                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5882                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5883                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5884                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5885                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5886                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5887                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5888                 </fields>
5889                 <links>
5890                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5891                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5892                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5893                 </links>
5894         </class>
5895         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5896                 <fields oils_persist:primary="id" oils_persist:sequence="">
5897                         <field name="checkin_lib" reporter:datatype="link"/>
5898                         <field name="checkin_staff" reporter:datatype="link"/>
5899                         <field name="checkin_time" reporter:datatype="timestamp"/>
5900                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5901                         <field name="circ_staff" reporter:datatype="link"/>
5902                         <field name="desk_renewal" reporter:datatype="bool"/>
5903                         <field name="due_date" reporter:datatype="timestamp"/>
5904                         <field name="duration" reporter:datatype="interval"/>
5905                         <field name="duration_rule" reporter:datatype="link"/>
5906                         <field name="fine_interval" reporter:datatype="interval"/>
5907                         <field name="id" reporter:datatype="id" />
5908                         <field name="max_fine" reporter:datatype="money" />
5909                         <field name="max_fine_rule" reporter:datatype="link"/>
5910                         <field name="opac_renewal" reporter:datatype="bool"/>
5911                         <field name="phone_renewal" reporter:datatype="bool"/>
5912                         <field name="recurring_fine" reporter:datatype="money" />
5913                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5914                         <field name="renewal_remaining" reporter:datatype="int" />
5915             <field name="grace_period" reporter:datatype="interval" />
5916                         <field name="stop_fines" reporter:datatype="text"/>
5917                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5918                         <field name="target_copy" reporter:datatype="link"/>
5919                         <field name="usr" reporter:datatype="link"/>
5920                         <field name="xact_finish" reporter:datatype="timestamp" />
5921                         <field name="xact_start" reporter:datatype="timestamp" />
5922                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5923                 </fields>
5924                 <links>
5925                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5926                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5927                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5928                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5929                 </links>
5930         </class>
5931         <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">
5932                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5933                         <field name="field" reporter:datatype="link"/>
5934                         <field name="id" reporter:datatype="id" />
5935                         <field name="source" reporter:datatype="link"/>
5936                         <field name="value" reporter:datatype="text"/>
5937                 </fields>
5938                 <links>
5939                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5940                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5941                 </links>
5942         </class>
5943         <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">
5944                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5945                         <field name="high" reporter:datatype="money" />
5946                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5947                         <field name="low" reporter:datatype="money" />
5948                         <field name="name" reporter:datatype="text"/>
5949                         <field name="normal" reporter:datatype="money" />
5950                         <field name="recurrence_interval" reporter:datatype="interval"/>
5951             <field name="grace_period" reporter:datatype="interval" />
5952                 </fields>
5953                 <links/>
5954         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5955             <actions>
5956                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5957                 <retrieve/>
5958                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5959                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5960             </actions>
5961         </permacrud>
5962         </class>
5963         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5964                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5965                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5966                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5967                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5968                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5969                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5970                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5971                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5972                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5973                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5974                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5975                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5976                 </fields>
5977                 <links>
5978                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5979                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5980                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5981                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5982                 </links>
5983         </class>
5984         <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">
5985                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5986                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5987                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5988                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5989                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5990                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5991                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5992                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5993                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5994                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5995                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5996                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5997                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5998                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5999                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6000                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6001                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6002                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6003                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6004                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6005                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6006                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6007                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6008                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6009                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6010                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6011                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6012                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6013                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6014                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6015                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6016                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6017                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
6018                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6019                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6020                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6021                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6022                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6023                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6024                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6025                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6026                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6027                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6028                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6029                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6030                 </fields>
6031                 <links>
6032                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6033                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6034                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6035                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6036                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6037                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6038                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6039                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6040                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6041                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6042                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6043                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6044                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6045                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6046                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6047                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6048                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6049                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6050                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6051                 </links>
6052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6053             <actions>
6054                 <create permission="CREATE_COPY">
6055                     <context link="call_number" field="owning_lib"/>
6056                 </create>
6057                 <retrieve/>
6058                 <update permission="UPDATE_COPY">
6059                     <context link="call_number" field="owning_lib"/>
6060                 </update>
6061                 <delete permission="DELETE_COPY">
6062                     <context link="call_number" field="owning_lib"/>
6063                 </delete>
6064             </actions>
6065         </permacrud>
6066         </class>
6067
6068         <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">
6069                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6070                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6071                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6072                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6073                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6074                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6075                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6076                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6077                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6078                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6079                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6080                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6081                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6082                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6083                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6084                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6085                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6086                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6087                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6088                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6089                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6090                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6091                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6092                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6093                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
6094                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6095                 </fields>
6096                 <links>
6097                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6098                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6099                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6100                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6101                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6102                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6103                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6104                 </links>
6105                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6106                         <actions>
6107                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6108                                 <retrieve />
6109                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6110                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6111                         </actions>
6112                 </permacrud>
6113         </class>
6114
6115         <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">
6116                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6117                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6118                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6119                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6120                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6121                 </fields>
6122                 <links/>
6123         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6124             <actions>
6125                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6126                 <retrieve/>
6127                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6128                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6129             </actions>
6130         </permacrud>
6131         </class>
6132         <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">
6133                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6134                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6135                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6136                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6137                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6138                 </fields>
6139                 <links/>
6140         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6141             <actions>
6142                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6143                 <retrieve/>
6144                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6145                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6146             </actions>
6147         </permacrud>
6148         </class>
6149         <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">
6150                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6151                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6152                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6153                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6154                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6155                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6156                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6157                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6158                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6159                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6160                 </fields>
6161                 <links>
6162                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6163                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6164                 </links>
6165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6166             <actions>
6167                 <create permission="CREATE_PERM" global_required="true"/>
6168                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6169                 <update permission="UPDATE_PERM" global_required="true"/>
6170                 <delete permission="DELETE_PERM" global_required="true"/>
6171             </actions>
6172         </permacrud>
6173         </class>
6174         <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">
6175                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6176                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6177                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6178                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6179                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6180                 </fields>
6181                 <links>
6182                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6183                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6184                 </links>
6185         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6186             <actions>
6187                 <create permission="ADMIN_SURVEY">
6188                     <context link="question" jump="survey" field="owner"/>
6189                 </create>
6190                 <retrieve/>
6191                 <update permission="ADMIN_SURVEY">
6192                     <context link="question" jump="survey" field="owner"/>
6193                 </update>
6194                 <delete permission="ADMIN_SURVEY">
6195                     <context link="question" jump="survey" field="owner"/>
6196                 </delete>
6197             </actions>
6198         </permacrud>
6199         </class>
6200         <class id="ancc" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
6201                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6202                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6203                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6204                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6205                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6206                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6207                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6208                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6209                 </fields>
6210                 <links>
6211                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6212                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6213                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6214                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6215                 </links>
6216         </class>
6217         <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">
6218                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6219                         <field name="balance_owed" reporter:datatype="money" />
6220                         <field name="total_owed" reporter:datatype="money" />
6221                         <field name="total_paid" reporter:datatype="money" />
6222                         <field name="usr" reporter:datatype="link"/>
6223                 </fields>
6224                 <links>
6225                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6226                 </links>
6227         </class>
6228         <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">
6229                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6230                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6231                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6232                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6233                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6234                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6235                 </fields>
6236                 <links>
6237                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6238                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6239                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6240                 </links>
6241         </class>
6242         <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">
6243                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6244                         <field name="field" reporter:datatype="link"/>
6245                         <field name="id" reporter:datatype="id" />
6246                         <field name="source" reporter:datatype="link"/>
6247                         <field name="value" reporter:datatype="text"/>
6248                 </fields>
6249                 <links>
6250                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6251                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6252                 </links>
6253         </class>
6254         <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">
6255                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6256                         <field name="field" reporter:datatype="link"/>
6257                         <field name="id" reporter:datatype="id" />
6258                         <field name="source" reporter:datatype="link"/>
6259                         <field name="value" reporter:datatype="text"/>
6260                 </fields>
6261                 <links>
6262                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6263                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6264                 </links>
6265         </class>
6266         <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">
6267                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6268                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6269                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6270                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6271                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6272                 </fields>
6273                 <links>
6274                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6275                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6276                 </links>
6277         </class>
6278         <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">
6279                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6280                         <field name="depth" reporter:datatype="int" />
6281                         <field name="grantable" reporter:datatype="bool"/>
6282                         <field name="grp" reporter:datatype="link"/>
6283                         <field name="id" reporter:datatype="id" />
6284                         <field name="perm" reporter:datatype="link"/>
6285                 </fields>
6286                 <links>
6287                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6288                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6289                 </links>
6290         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6291             <actions>
6292                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6293                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6294                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6295                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6296             </actions>
6297         </permacrud>
6298         </class>
6299         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6300                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6301                         <field name="items" oils_persist:virtual="true" />
6302                         <field name="btype" reporter:datatype="text"/>
6303                         <field name="id" reporter:datatype="id" />
6304                         <field name="name" reporter:datatype="text"/>
6305                         <field name="description" reporter:datatype="text"/>
6306                         <field name="owner" reporter:datatype="link"/>
6307                         <field name="pub" reporter:datatype="bool"/>
6308                         <field name="create_time" reporter:datatype="timestamp" />
6309                 </fields>
6310                 <links>
6311                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6312                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6313                 </links>
6314         </class>
6315         <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">
6316                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6317                         <field name="id" reporter:datatype="id" />
6318                         <field name="bucket" reporter:datatype="link"/>
6319                         <field name="note" reporter:datatype="text" />
6320                 </fields>
6321                 <links>
6322                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6323                 </links>
6324         </class>
6325         <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">
6326                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6327                         <field name="id" reporter:datatype="int" />
6328                         <field name="usr" reporter:datatype="link"/>
6329                         <field name="work_ou" reporter:datatype="link"/>
6330                 </fields>
6331                 <links>
6332                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6333                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6334                 </links>
6335         </class>
6336         <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">
6337                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6338                         <field name="depth" reporter:datatype="int"/>
6339                         <field name="grantable" reporter:datatype="bool"/>
6340                         <field name="id" reporter:datatype="id" />
6341                         <field name="perm" reporter:datatype="link"/>
6342                         <field name="usr" reporter:datatype="link"/>
6343                 </fields>
6344                 <links>
6345                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6346                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6347                 </links>
6348         </class>
6349         <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">
6350                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6351                         <field name="object_id" reporter:datatype="text"/>
6352                         <field name="grantable" reporter:datatype="bool"/>
6353                         <field name="id" reporter:datatype="id" />
6354                         <field name="perm" reporter:datatype="link"/>
6355                         <field name="usr" reporter:datatype="link"/>
6356                         <field name="object_type" reporter:datatype="text"/>
6357                 </fields>
6358                 <links>
6359                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6360                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6361                 </links>
6362         </class>
6363         <class id="mp" controller="open-ils.cstore" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
6364                 <fields oils_persist:primary="id" oils_persist:sequence="">
6365                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6366                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6367                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6368                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6369                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6370                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6371                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6372                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6373                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6374                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6375                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6376                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6377                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6378                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6379                 </fields>
6380                 <links>
6381                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6382                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6383                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6384                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6385                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6386                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6387                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6388                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6389                 </links>
6390         </class>
6391         <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">
6392                 <fields oils_persist:primary="id" oils_persist:sequence="">
6393                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6394                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6395                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6396                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6397                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6398                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6399                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6400                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6401                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6402                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6403                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6404                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6405                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6406                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6407                 </fields>
6408                 <links>
6409                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6410                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6411                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6412                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6413                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6414                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6415                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6416                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6417                 </links>
6418         </class>
6419         <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">
6420                 <fields oils_persist:primary="id" oils_persist:sequence="">
6421                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6422                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6423                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6424                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6425                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6426                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6427                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6428                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6429                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6430                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6431                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6432                 </fields>
6433                 <links>
6434                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6435                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6436                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6437                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6438                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6439                 </links>
6440         </class>
6441         <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">
6442                 <fields oils_persist:primary="id" oils_persist:sequence="">
6443                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6444                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6445                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6446                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6447                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6448                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6449                         <field reporter:label="Accepting User" name="accepting_usr" />
6450                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6451                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6452                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6453                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6454                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6455                 </fields>
6456                 <links>
6457                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6458                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6459                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6460                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6461                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6462                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6463                 </links>
6464         </class>
6465         <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">
6466                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6467                         <field name="bucket" reporter:datatype="link"/>
6468                         <field name="id" reporter:datatype="id" />
6469                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6470                         <field name="create_time" reporter:datatype="timestamp" />
6471                         <field name="pos" reporter:datatype="int" />
6472                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6473                 </fields>
6474                 <links>
6475                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6476                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6477             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6478                 </links>
6479         </class>
6480         <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">
6481                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6482                         <field name="id" reporter:datatype="id" />
6483                         <field name="item" reporter:datatype="link"/>
6484                         <field name="note" reporter:datatype="text" />
6485                 </fields>
6486                 <links>
6487                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6488                 </links>
6489         </class>
6490         <class id="asce" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
6491                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6492                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6493                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6494                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6495                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6496                 </fields>
6497                 <links>
6498                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6499                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6500                 </links>
6501         </class>
6502     <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">
6503         <fields oils_persist:primary="field">
6504             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6505             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6506             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6507         </fields>
6508         <links/>
6509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6510             <actions>
6511                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6512                 <retrieve />
6513                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6514                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6515             </actions>
6516         </permacrud>
6517     </class>
6518         <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">
6519                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6520                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6521                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6522                 </fields>
6523                 <links/>
6524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6525             <actions>
6526                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6527                 <retrieve/>
6528                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6529                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6530             </actions>
6531         </permacrud>
6532         </class>
6533
6534
6535         <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">
6536                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6537                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6538                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6539                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6540                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6541                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6542                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6543                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6544                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6545                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6546                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6547                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6548                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6549                 </fields>
6550                 <links>
6551                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6552                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6553                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6554                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6555                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6556                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6557                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6558                 </links>
6559         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6560             <actions>
6561                 <create permission="TRANSIT_COPY">
6562                     <context link="target_copy" field="owner"/>
6563                 </create>
6564                 <retrieve/>
6565                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6566                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6567             </actions>
6568         </permacrud>
6569         </class>
6570         <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">
6571                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6572                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6573                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6574                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6575                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6576                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6577                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6578                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6579                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6580                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6581                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6582                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6583                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6584                 </fields>
6585                 <links>
6586                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6587                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6588                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6589                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6590                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6591                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6592                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6593                 </links>
6594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6595             <actions>
6596                 <create permission="TRANSIT_COPY" context_field="owner">
6597                     <context link="target_copy" field="circ_lib"/>
6598                 </create>
6599                 <retrieve/>
6600                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6601                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6602             </actions>
6603         </permacrud>
6604         </class>
6605         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6606                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6607                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6608                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6609                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6610                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6611                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6612                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6613                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6614                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6615                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6616                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6617                 </fields>
6618                 <links>
6619                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6620                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6621                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6622                 </links>
6623         </class>
6624         <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">
6625                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6626                         <field name="grp" />
6627                         <field name="id" reporter:datatype="id" />
6628                         <field name="usr" />
6629                 </fields>
6630                 <links>
6631                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6632                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6633                 </links>
6634         </class>
6635         <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">
6636                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6637                         <field name="id" reporter:datatype="id" />
6638                         <field name="fq_field" reporter:datatype="text"/>
6639                         <field name="identity_value" reporter:datatype="text"/>
6640                         <field name="translation" reporter:datatype="text"/>
6641                         <field name="string" reporter:datatype="text"/>
6642                 </fields>
6643                 <links>
6644                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6645                 </links>
6646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6647             <actions>
6648                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6649                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6650                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6651                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6652             </actions>
6653         </permacrud>
6654         </class>
6655         <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">
6656                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6657                         <field name="id" reporter:datatype="id" />
6658                         <field name="fm_class" reporter:datatype="text"/>
6659                         <field name="field" reporter:datatype="text"/>
6660                         <field name="owner" reporter:datatype="org_unit"/>
6661                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6662                 </fields>
6663                 <links>
6664                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6665                 </links>
6666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6667             <actions>
6668                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6669                 <retrieve/>
6670                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6671                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6672             </actions>
6673         </permacrud>
6674         </class>
6675         <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">
6676                 <fields oils_persist:primary="code">
6677                         <field name="code" reporter:datatype="id" />
6678                         <field name="marc_code" reporter:datatype="text"/>
6679                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6680                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6681                 </fields>
6682                 <links/>
6683         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6684             <actions>
6685                 <create permission="CREATE_LOCALE" global_required="true"/>
6686                 <retrieve/>
6687                 <update permission="UPDATE_LOCALE" global_required="true"/>
6688                 <delete permission="DELETE_LOCALE" global_required="true"/>
6689             </actions>
6690         </permacrud>
6691         </class>
6692         <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">
6693                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6694                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6695                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6696                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6697             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6698                 </fields>
6699                 <links>
6700                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6701                 </links>
6702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6703             <actions>
6704                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6705                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6706                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6707                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6708             </actions>
6709         </permacrud>
6710         </class>
6711
6712         <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">
6713                 <fields oils_persist:primary="id">
6714                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6715                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6716                 </fields>
6717                 <links/>
6718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6719             <actions>
6720                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6721                 <retrieve/>
6722                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6723                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6724             </actions>
6725         </permacrud>
6726         </class>
6727
6728         <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">
6729                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6730                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6731                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6732                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6733                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6734                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6735                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6736                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6737                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6738                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6739                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6740                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6741                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6742                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6743                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6744                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6745                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6746                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6747                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6748                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6749                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6750                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6751                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6752                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6753                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6754                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6755                 </fields>
6756                 <links>
6757                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6758                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6759                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6760                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6761                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6762                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6763                 </links>
6764         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6765             <actions>
6766                 <create permission="user_request.create">
6767                     <context link="usr" field="home_ou"/>
6768                                 </create>
6769                 <retrieve permission="user_request.view">
6770                     <context link="usr" field="home_ou"/>
6771                                 </retrieve>
6772                 <update permission="user_request.update">
6773                     <context link="usr" field="home_ou"/>
6774                                 </update>
6775                 <delete permission="user_request.delete">
6776                     <context link="usr" field="home_ou"/>
6777                                 </delete>
6778             </actions>
6779         </permacrud>
6780         </class>
6781
6782         <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">
6783                 <fields oils_persist:primary="code">
6784                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6785                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6786                 </fields>
6787                 <links/>
6788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6789             <actions>
6790                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6791                 <retrieve/>
6792                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6793                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6794             </actions>
6795         </permacrud>
6796         </class>
6797
6798         <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">
6799                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6800                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6801                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6802                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6803                         <field reporter:label="Ratio" name="ratio" />
6804                 </fields>
6805                 <links>
6806                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6807                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6808                 </links>
6809                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6810                         <actions>
6811                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6812                                 <retrieve/>
6813                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6814                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6815                         </actions>
6816                 </permacrud>
6817         </class>
6818
6819         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6820                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6821                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6822                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6823                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6824                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6825                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6826                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6827                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6828                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6829                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6830                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6831                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6832                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6833                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6834                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6835                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6836                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6837                 </fields>
6838                 <links>
6839                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6840                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6841             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6842             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6843             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6844                 </links>
6845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6846             <actions>
6847                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6848                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6849                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6850                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6851             </actions>
6852         </permacrud>
6853         </class>
6854
6855         <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">
6856                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6857                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6858                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6859                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6860                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6861                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6862                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6863                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6864                 </fields>
6865                 <links>
6866                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6867                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6868                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6869                 </links>
6870         </class>
6871
6872         <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">
6873                 <fields oils_persist:primary="code">
6874                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6875                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6876                 </fields>
6877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6878             <actions>
6879                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6880                 <retrieve/>
6881                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6882                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6883             </actions>
6884                 </permacrud>
6885         </class>
6886
6887         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6888                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6889                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6890                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6891                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6892                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6893                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6894                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6895                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6896                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6897                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6898                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6899                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6900                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6901                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6902                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6903                 </fields>
6904                 <links>
6905                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6906                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6907                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6908                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6909                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6910                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6911                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6912                 </links>
6913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6914             <actions>
6915                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6916                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6917                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6918                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6919             </actions>
6920         </permacrud>
6921         </class>
6922
6923         <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">
6924                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6925                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6926                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6927                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6928                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6929                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6930                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6931                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6932                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6933                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6934                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6935                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6936                 </fields>
6937                 <links>
6938                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6939                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6940                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6941                 </links>
6942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6943             <actions>
6944                 <create   permission="ADMIN_INVOICE">
6945                                         <context link="invoice" field="receiver"/>
6946                                 </create>
6947                 <retrieve permission="ADMIN_INVOICE">
6948                                         <context link="invoice" field="receiver"/>
6949                                 </retrieve>
6950                 <update   permission="ADMIN_INVOICE">
6951                                         <context link="invoice" field="receiver"/>
6952                                 </update>
6953                                 <delete   permission="ADMIN_INVOICE">
6954                                         <context link="invoice" field="receiver"/>
6955                                 </delete>
6956             </actions>
6957         </permacrud>
6958         </class>
6959
6960         <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">
6961                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6962                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6963                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6964                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6965                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6966                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6967                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6968                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6969                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6970                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6971                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6972                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6973                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6974                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6975                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6976                 </fields>
6977                 <links>
6978                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6979                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6980                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6981                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6982                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6983                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6984                 </links>
6985         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6986             <actions>
6987                 <create   permission="ADMIN_INVOICE">
6988                                         <context link="invoice" field="receiver"/>
6989                                 </create>
6990                 <retrieve permission="ADMIN_INVOICE">
6991                                         <context link="invoice" field="receiver"/>
6992                                 </retrieve>
6993                 <update   permission="ADMIN_INVOICE">
6994                                         <context link="invoice" field="receiver"/>
6995                                 </update>
6996                                 <delete   permission="ADMIN_INVOICE">
6997                                         <context link="invoice" field="receiver"/>
6998                                 </delete>
6999             </actions>
7000         </permacrud>
7001         </class>
7002
7003         <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">
7004                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7005                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7006                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7007                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7008                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7009                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7010                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7011                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7012                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7013                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7014                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7015                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7016                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7017                 </fields>
7018                 <links>
7019                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7020                 </links>
7021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7022             <actions>
7023                 <create permission="ADMIN_PROVIDER">
7024                     <context link="provider" field="owner"/>
7025                 </create>
7026                 <retrieve permission="ADMIN_PROVIDER">
7027                     <context link="provider" field="owner"/>
7028                 </retrieve>
7029                 <update permission="ADMIN_PROVIDER">
7030                     <context link="provider" field="owner"/>
7031                 </update>
7032                 <delete permission="ADMIN_PROVIDER">
7033                     <context link="provider" field="owner"/>
7034                 </delete>
7035             </actions>
7036         </permacrud>
7037         </class>
7038
7039         <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">
7040                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7041                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7042                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7043                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7044                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7045                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7046                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7047         </fields>
7048                 <links>
7049                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7050                 </links>
7051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7052             <actions>
7053                 <create permission="ADMIN_PROVIDER">
7054                     <context link="provider" field="owner"/>
7055                 </create>
7056                 <retrieve permission="ADMIN_PROVIDER">
7057                     <context link="provider" field="owner"/>
7058                 </retrieve>
7059                 <update permission="ADMIN_PROVIDER">
7060                     <context link="provider" field="owner"/>
7061                 </update>
7062                 <delete permission="ADMIN_PROVIDER">
7063                     <context link="provider" field="owner"/>
7064                 </delete>
7065             </actions>
7066         </permacrud>
7067     </class>
7068         <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">
7069                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7070                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7071                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7072                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7073                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7074                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7075                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7076                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7077                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7078                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7079                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7080                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7081                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7082                 </fields>
7083                 <links>
7084                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7085                 </links>
7086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7087             <actions>
7088                 <create permission="ADMIN_PROVIDER">
7089                     <context link="contact" jump='provider' field="owner"/>
7090                 </create>
7091                 <retrieve permission="ADMIN_PROVIDER">
7092                     <context link="contact" jump='provider' field="owner"/>
7093                 </retrieve>
7094                 <update permission="ADMIN_PROVIDER">
7095                     <context link="contact" jump='provider' field="owner"/>
7096                 </update>
7097                 <delete permission="ADMIN_PROVIDER">
7098                     <context link="contact" jump='provider' field="owner"/>
7099                 </delete>
7100             </actions>
7101         </permacrud>
7102         </class>
7103
7104         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7105                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7106                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7107                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7108                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7109                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7110                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7111                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7112                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7113                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7114                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7115                 </fields>
7116                 <links>
7117                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7118                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7119                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7120                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7121                 </links>
7122         </class>
7123
7124         <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">
7125                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7126                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7127                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7128                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7129                 </fields>
7130                 <links>
7131             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7132                 </links>
7133                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7134                         <actions>
7135                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7136                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7137                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7138                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7139                         </actions>
7140                 </permacrud>
7141         </class>
7142
7143         <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">
7144                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7145                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7146                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7147                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7148                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7149                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7150                 </fields>
7151                 <links>
7152                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7153                 </links>
7154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7155                         <actions>
7156                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7157                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7158                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7159                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7160                         </actions>
7161                 </permacrud>
7162         </class>
7163
7164         <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">
7165                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7166                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7167                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7168                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7169                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7170                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7171                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7172                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7173                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7174                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7175                 </fields>
7176                 <links>
7177                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7178                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7179             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7180             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7181                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7182                 </links>
7183         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7184             <actions>
7185                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7186                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7187                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7188                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7189             </actions>
7190         </permacrud>
7191         </class>
7192
7193         <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">
7194                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7195                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7196                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7197                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7198                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7199                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7200                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7201                 </fields>
7202                 <links>
7203                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7204                 </links>
7205                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7206                         <actions>
7207                                 <create permission="ADMIN_FUNDING_SOURCE">
7208                     <context link="funding_source" field="owner"/>
7209                 </create>
7210                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7211                     <context link="funding_source" field="owner"/>
7212                 </retrieve>
7213                                 <update permission="ADMIN_FUNDING_SOURCE">
7214                     <context link="funding_source" field="owner"/>
7215                 </update>
7216                                 <delete permission="ADMIN_FUNDING_SOURCE">
7217                     <context link="funding_source" field="owner"/>
7218                 </delete>
7219                         </actions>
7220                 </permacrud>
7221         </class>
7222
7223         <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">
7224                 <fields oils_persist:primary="id">
7225                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7226                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7227                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7228                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7229                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7230                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7231                 </fields>
7232                 <links>
7233                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7234                 </links>
7235         </class>
7236
7237         <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">
7238                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7239                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7240                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7241                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7242                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7243                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7244                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7245                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7246                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7247                 </fields>
7248                 <links>
7249                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7250                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7251                 </links>
7252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7253                         <actions>
7254                                 <create permission="ADMIN_ACQ_FUND">
7255                     <context link="fund" field="org"/>
7256                 </create>
7257                                 <retrieve permission="ADMIN_ACQ_FUND">
7258                     <context link="fund" field="org"/>
7259                 </retrieve>
7260                                 <update permission="ADMIN_ACQ_FUND">
7261                     <context link="fund" field="org"/>
7262                 </update>
7263                                 <delete permission="ADMIN_ACQ_FUND">
7264                     <context link="fund" field="org"/>
7265                 </delete>
7266                         </actions>
7267                 </permacrud>
7268         </class>
7269
7270         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7271                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7272                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7273                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7274                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7275                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7276                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7277                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7278                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7279                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7280                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7281                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7282                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7283                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7284                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7285                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7286                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7287                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7288                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7289                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7290                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7291                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7292                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7293                 </fields>
7294                 <links>
7295                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7296                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7297             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7298             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7299             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7300             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7301             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7302             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7303             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7304             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7305             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7306                 </links>
7307         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7308             <actions>
7309                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7310                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7311                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7312                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7313             </actions>
7314         </permacrud>
7315         </class>
7316
7317         <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">
7318                 <fields oils_persist:primary="fund">
7319                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7320                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7321                 </fields>
7322                 <links>
7323                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7324                 </links>
7325         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7326             <actions>
7327                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7328                                         <context link="fund" field="org" />
7329                 </retrieve>
7330             </actions>
7331         </permacrud>
7332         </class>
7333
7334         <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">
7335                 <fields oils_persist:primary="fund">
7336                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7337                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7338                 </fields>
7339                 <links>
7340                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7341                 </links>
7342         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7343             <actions>
7344                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7345                                         <context link="fund" field="org" />
7346                 </retrieve>
7347             </actions>
7348         </permacrud>
7349         </class>
7350
7351         <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">
7352                 <fields oils_persist:primary="fund">
7353                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7354                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7355                 </fields>
7356                 <links>
7357                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7358                 </links>
7359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7360             <actions>
7361                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7362                                         <context link="fund" field="org" />
7363                 </retrieve>
7364             </actions>
7365         </permacrud>
7366         </class>
7367
7368         <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">
7369                 <fields oils_persist:primary="fund">
7370                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7371                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7372                 </fields>
7373                 <links>
7374                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7375                 </links>
7376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7377             <actions>
7378                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7379                                         <context link="fund" field="org" />
7380                 </retrieve>
7381             </actions>
7382         </permacrud>
7383         </class>
7384
7385         <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">
7386                 <fields oils_persist:primary="fund">
7387                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7388                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7389                 </fields>
7390                 <links>
7391                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7392                 </links>
7393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7394             <actions>
7395                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7396                                         <context link="fund" field="org" />
7397                 </retrieve>
7398             </actions>
7399         </permacrud>
7400         </class>
7401
7402    <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">
7403         <fields oils_persist:primary="fund">
7404             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7405             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7406         </fields>
7407         <links>
7408             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7409         </links>
7410     </class>
7411
7412    <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">
7413         <fields oils_persist:primary="fund">
7414             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7415             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7416         </fields>
7417         <links>
7418             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7419         </links>
7420     </class>
7421
7422    <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">
7423         <fields oils_persist:primary="fund">
7424             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7425             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7426         </fields>
7427         <links>
7428             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7429         </links>
7430     </class>
7431
7432    <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">
7433         <fields oils_persist:primary="fund">
7434             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7435             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7436         </fields>
7437         <links>
7438             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7439         </links>
7440     </class>
7441
7442    <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">
7443         <fields oils_persist:primary="fund">
7444             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7445             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7446         </fields>
7447         <links>
7448             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7449         </links>
7450     </class>
7451
7452         <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">
7453                 <fields oils_persist:primary="funding_source">
7454                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7455                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7456                 </fields>
7457                 <links>
7458                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7459                 </links>
7460         </class>
7461
7462         <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">
7463                 <fields oils_persist:primary="funding_source">
7464                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7465                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7466                 </fields>
7467                 <links>
7468                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7469                 </links>
7470         </class>
7471
7472         <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">
7473                 <fields oils_persist:primary="funding_source">
7474                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7475                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7476                 </fields>
7477                 <links>
7478                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7479                 </links>
7480         </class>
7481
7482         <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">
7483                 <fields oils_persist:primary="fund">
7484                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7485                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7486                 </fields>
7487                 <links>
7488                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7489                 </links>
7490         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7491             <actions>
7492                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7493                                         <context link="fund" field="org" />
7494                 </retrieve>
7495             </actions>
7496         </permacrud>
7497     </class>
7498     <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">
7499         <oils_persist:source_definition><![CDATA[
7500             SELECT
7501                 acqf.*,
7502                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7503                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7504                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7505                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7506             FROM
7507                 acq.fund acqf
7508                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7509                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7510                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7511                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7512         ]]></oils_persist:source_definition>
7513         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7514             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7515             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7516             <field reporter:label="Name" name="name" reporter:datatype="text" />
7517             <field reporter:label="Year" name="year" reporter:datatype="int" />
7518             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7519             <field reporter:label="Code" name="code" reporter:datatype="text" />
7520             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7521             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7522             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7523             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7524             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7525
7526             <!-- non fund-native fields -->
7527             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7528             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7529             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7530             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7531         </fields>
7532         <links>
7533             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7534             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7535             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7536         </links>
7537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7538             <actions>
7539                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7540             </actions>
7541         </permacrud>
7542         </class>
7543         <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">
7544                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7545                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7546                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7547                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7548                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7549                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7550                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7551                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7552                 </fields>
7553                 <links>
7554                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7555                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7556                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7557                 </links>
7558                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7559                         <actions>
7560                                 <create permission="ADMIN_ACQ_FUND">
7561                     <context link="fund" field="org"/>
7562                 </create>
7563                                 <retrieve permission="ADMIN_ACQ_FUND">
7564                     <context link="fund" field="org"/>
7565                 </retrieve>
7566                                 <update permission="ADMIN_ACQ_FUND">
7567                     <context link="fund" field="org"/>
7568                 </update>
7569                                 <delete permission="ADMIN_ACQ_FUND">
7570                     <context link="fund" field="org"/>
7571                 </delete>
7572                         </actions>
7573                 </permacrud>
7574         </class>
7575
7576     <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">
7577         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7578             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7579             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7580             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7581             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7582             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7583             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7584             <field reporter:label="Note" name="note" reporter:datatype="text" />
7585             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7586         </fields>
7587         <links>
7588             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7589             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7590             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7591         </links>
7592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7593                         <actions>
7594                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7595                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7596                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7597                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7598                         </actions>
7599                 </permacrud>
7600     </class>
7601
7602         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7603                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7604                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7605                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7606                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7607                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7608                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7609                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7610                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7611                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7612                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7613                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7614                 </fields>
7615                 <links>
7616                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7617                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7618                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7619                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7620                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7621                 </links>
7622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7623                         <actions>
7624                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7625                         </actions>
7626                 </permacrud>
7627         </class>
7628
7629         <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">
7630                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7631                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7632                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7633                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7634                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7635                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7636                 </fields>
7637                 <links>
7638                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7639                 </links>
7640                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7641                         <actions>
7642                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7643                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7644                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7645                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7646                         </actions>
7647                 </permacrud>
7648         </class>
7649
7650         <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">
7651                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7652                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7653                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7654                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7655                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7656                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7657                         <field reporter:label="State" name="state" reporter:datatype="text" />
7658                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7659                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7660                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7661                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7662                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7663                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7664                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7665                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7666                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7667                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7668                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7669                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7670                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7671                 </fields>
7672                 <links>
7673                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7674                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7675                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7676                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7677                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7678                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7679                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7680                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7681                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7682                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7683                 </links>
7684                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7685                         <actions>
7686                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7687                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7688                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7689                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7690                         </actions>
7691                 </permacrud>
7692         </class>
7693
7694         <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">
7695                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7696                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7697                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7698                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7699                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7700                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7701                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7702                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7703                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7704                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7705                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7706                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7707                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7708                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7709                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7710                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7711                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7712                 </fields>
7713                 <links>
7714                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7715                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7716                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7717                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7718                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7719                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7720                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7721                 </links>
7722                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7723             <actions>
7724                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7725             </actions>
7726                 </permacrud>
7727         </class>
7728
7729         <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">
7730                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7731                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7732                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7733                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7734                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7735                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7736                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7737                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7738                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7739                 </fields>
7740                 <links>
7741                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7742                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7743                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7744                 </links>
7745                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7746             <actions>
7747                 <create permission="CREATE_PURCHASE_ORDER">
7748                     <context link="purchase_order" field="ordering_agency"/>
7749                 </create>
7750                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7751                     <context link="purchase_order" field="ordering_agency"/>
7752                 </retrieve>
7753                 <update permission="CREATE_PURCHASE_ORDER">
7754                     <context link="purchase_order" field="ordering_agency"/>
7755                 </update>
7756                 <delete permission="CREATE_PURCHASE_ORDER">
7757                     <context link="purchase_order" field="ordering_agency"/>
7758                 </delete>
7759             </actions>
7760                 </permacrud>
7761         </class>
7762
7763         <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">
7764                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7765                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7766                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7767                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7768                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7769                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7770                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7771                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7772                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7773                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7774                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7775                 </fields>
7776                 <links>
7777                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7778                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7779                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7780                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7781                 </links>
7782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7783             <actions>
7784                 <create permission="CREATE_PURCHASE_ORDER">
7785                     <context link="purchase_order" field="ordering_agency"/>
7786                 </create>
7787                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7788                     <context link="purchase_order" field="ordering_agency"/>
7789                 </retrieve>
7790                 <update permission="CREATE_PURCHASE_ORDER">
7791                     <context link="purchase_order" field="ordering_agency"/>
7792                 </update>
7793                 <delete permission="CREATE_PURCHASE_ORDER">
7794                     <context link="purchase_order" field="ordering_agency"/>
7795                 </delete>
7796             </actions>
7797                 </permacrud>
7798         </class>
7799
7800         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7801                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7802                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7803                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7804                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7805                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7806                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7807                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7808                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7809                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7810                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7811                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7812                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7813                         <field reporter:label="State" name="state" reporter:datatype="text" />
7814                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7815                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7816                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7817                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7818                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7819                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7820                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7821                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7822                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7823                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7824                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7825                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7826                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7827                 </fields>
7828                 <links>
7829                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7830                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7831                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7832                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7833                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7834                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7835                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7836                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7837                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7838                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7839                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7840                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7841                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7842                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7843                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7844                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7845                 </links>
7846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7847                         <actions>
7848                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7849                                         <context link="purchase_order" field="ordering_agency"/>
7850                                         <context link="picklist" field="org_unit"/>
7851                                 </retrieve>
7852                         </actions>
7853                 </permacrud>
7854         </class>
7855
7856         <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">
7857                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7858                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7859                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7860                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7861                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7862                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7863                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7864                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7865                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7866                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7867                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7868                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7869                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7870                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7871                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7872                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7873                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7874                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7875                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7876                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7877                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7878                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7879                 </fields>
7880                 <links>
7881                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7882                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7883                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7884                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7885                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7886                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7887                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7888                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7889                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7890                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7891                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7892                 </links>
7893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7894                         <actions>
7895                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7896                                         <context link="purchase_order" field="ordering_agency"/>
7897                                         <context link="picklist" field="org_unit"/>
7898                                 </retrieve>
7899                         </actions>
7900                 </permacrud>
7901         </class>
7902
7903         <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">
7904                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7905                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7906                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7907                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7908                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7909                 </fields>
7910                 <links>
7911                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7912                 </links>
7913                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7914                         <actions>
7915                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7916                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7917                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7918                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7919                         </actions>
7920                 </permacrud>
7921         </class>
7922
7923         <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">
7924                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7925                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7926                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7927                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7928                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7929                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7930                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7931                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7932                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7933                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7934                 </fields>
7935                 <links>
7936                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7937                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7938                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7939                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7940                 </links>
7941         </class>
7942
7943         <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">
7944                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7945                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7946                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7947                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7948                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7949                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7950                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7951                 </fields>
7952                 <links>
7953                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7954                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7955                 </links>
7956         </class>
7957
7958         <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">
7959                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7960                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7961                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7962                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7963                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7964                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7965                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7966                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7967                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7968                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7969                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7970                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7971                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7972                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7973                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7974                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7975                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7976                 </fields>
7977                 <links>
7978                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7979                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7980                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7981                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7982                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7983                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7984                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7985                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7986                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7987                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7988                 </links>
7989         </class>
7990
7991         <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">
7992                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7993                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7994                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7995                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7996                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7997                 </fields>
7998                 <links/>
7999                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8000                         <actions>
8001                                 <retrieve />
8002                         </actions>
8003                 </permacrud>
8004         </class>
8005
8006         <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">
8007                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8008                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8009                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8010                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8011                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8012                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8013             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8014                 </fields>
8015                 <links/>
8016         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8017             <actions>
8018                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8019                 <retrieve />
8020                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8021                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8022             </actions>
8023         </permacrud>
8024         </class>
8025
8026         <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">
8027                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8028                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8029                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8030                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8031                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8032                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8033                 </fields>
8034                 <links/>
8035         </class>
8036         <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">
8037                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8038                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8039                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8040                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8041                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8042                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8043                 </fields>
8044                 <links>
8045                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8046                 </links>
8047         </class>
8048
8049         <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">
8050             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8051                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8052                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8053                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8054                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8055                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8056                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8057         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8058
8059             </fields>
8060             <links>
8061                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8062             </links>
8063             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8064                 <actions>
8065                     <create permission="ADMIN_PROVIDER">
8066                         <context link="provider" field="owner"/>
8067                     </create>
8068                     <retrieve permission="ADMIN_PROVIDER">
8069                         <context link="provider" field="owner"/>
8070                     </retrieve>
8071                     <update permission="ADMIN_PROVIDER">
8072                         <context link="provider" field="owner"/>
8073                     </update>
8074                     <delete permission="ADMIN_PROVIDER">
8075                         <context link="provider" field="owner"/>
8076                     </delete>
8077                 </actions>
8078             </permacrud>
8079         </class>
8080         
8081         <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">
8082             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8083                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8084                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8085                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8086                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8087             </fields>
8088             <links>
8089                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8090             </links>
8091             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8092                 <actions>
8093                     <create permission="ADMIN_PROVIDER">
8094                         <context link="provider" field="owner"/>
8095                     </create>
8096                     <retrieve permission="ADMIN_PROVIDER">
8097                         <context link="provider" field="owner"/>
8098                     </retrieve>
8099                     <update permission="ADMIN_PROVIDER">
8100                         <context link="provider" field="owner"/>
8101                     </update>
8102                     <delete permission="ADMIN_PROVIDER">
8103                         <context link="provider" field="owner"/>
8104                     </delete>
8105                 </actions>
8106             </permacrud>
8107         </class>
8108         
8109         <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">
8110             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8111                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8112                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8113                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8114                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8115                 </fields>
8116                 <links/>
8117         </class>
8118
8119         <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">
8120                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8121                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8122                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8123                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8124                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8125                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8126                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8127                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8128                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8129                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8130                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8131                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8132                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8133                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8134                 </fields>
8135                 <links>
8136                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8137                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8138                 </links>
8139         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8140             <actions>
8141                 <create permission="ADMIN_PROVIDER">
8142                     <context link="provider" field="owner"/>
8143                 </create>
8144                 <retrieve permission="ADMIN_PROVIDER">
8145                     <context link="provider" field="owner"/>
8146                 </retrieve>
8147                 <update permission="ADMIN_PROVIDER">
8148                     <context link="provider" field="owner"/>
8149                 </update>
8150                 <delete permission="ADMIN_PROVIDER">
8151                     <context link="provider" field="owner"/>
8152                 </delete>
8153             </actions>
8154         </permacrud>
8155         </class>
8156
8157         <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">
8158                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8159                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8160                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8161                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8162                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8163                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8164                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8165                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8166                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8167                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8168                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8169                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8170                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8171                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8172                 </fields>
8173                 <links>
8174                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8175                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8176                 </links>
8177         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8178             <actions>
8179                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8180                     <context link="account" jump="provider" field="owner"/>
8181                 </retrieve>
8182                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8183                     <context link="account" jump="provider" field="owner"/>
8184                 </update>
8185                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8186                     <context link="account" jump="provider" field="owner"/>
8187                 </delete>
8188             </actions>
8189         </permacrud>
8190         </class>
8191
8192
8193         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8194                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8195                         <field name="id" reporter:datatype="id" />
8196                         <field name="parent" reporter:datatype="link"/>
8197                         <field name="owner" reporter:datatype="link"/>
8198                         <field name="create_time" reporter:datatype="timestamp"/>
8199                         <field name="name" reporter:datatype="text"/>
8200                         <field name="shared" reporter:datatype="bool"/>
8201                         <field name="share_with" reporter:datatype="link"/>
8202                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8203                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8204                 </fields>
8205                 <links>
8206                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8207                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8208                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8209                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8210                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8211                 </links>
8212         </class>
8213         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8214                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8215                         <field name="id" reporter:datatype="id" />
8216                         <field name="parent" reporter:datatype="link"/>
8217                         <field name="owner" reporter:datatype="link"/>
8218                         <field name="create_time" reporter:datatype="timestamp"/>
8219                         <field name="name" reporter:datatype="text"/>
8220                         <field name="shared" reporter:datatype="bool"/>
8221                         <field name="share_with" reporter:datatype="link"/>
8222                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8223                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8224                 </fields>
8225                 <links>
8226                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8227                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8228                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8229                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8230                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8231                 </links>
8232         </class>
8233         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8234                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8235                         <field name="id" reporter:datatype="id" />
8236                         <field name="parent" reporter:datatype="link"/>
8237                         <field name="owner" reporter:datatype="link"/>
8238                         <field name="create_time" reporter:datatype="timestamp"/>
8239                         <field name="name" reporter:datatype="text"/>
8240                         <field name="shared" reporter:datatype="bool"/>
8241                         <field name="share_with" reporter:datatype="link"/>
8242                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8243                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8244                 </fields>
8245                 <links>
8246                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8247                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8248                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8249                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8250                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8251                 </links>
8252         </class>
8253         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8254                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8255                         <field name="id" reporter:datatype="id" />
8256                         <field name="owner" reporter:datatype="link"/>
8257                         <field name="create_time" reporter:datatype="timestamp"/>
8258                         <field name="name" reporter:datatype="text"/>
8259                         <field name="data" reporter:datatype="text"/>
8260                         <field name="folder" reporter:datatype="link"/>
8261                         <field name="description" reporter:datatype="text"/>
8262                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8263                 </fields>
8264                 <links>
8265                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8266                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8267                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8268                 </links>
8269         </class>
8270         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8271                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8272                         <field name="id" reporter:datatype="id" />
8273                         <field name="owner" reporter:datatype="link"/>
8274                         <field name="create_time" reporter:datatype="timestamp"/>
8275                         <field name="template" reporter:datatype="link"/>
8276                         <field name="data" reporter:datatype="text"/>
8277                         <field name="folder" reporter:datatype="link"/>
8278                         <field name="recur" reporter:datatype="bool"/>
8279                         <field name="recurrence" reporter:datatype="interval"/>
8280                         <field name="name" reporter:datatype="text"/>
8281                         <field name="description" reporter:datatype="text"/>
8282                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8283                 </fields>
8284                 <links>
8285                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8286                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8287                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8288                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8289                 </links>
8290         </class>
8291         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8292                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8293                         <field name="id" reporter:datatype="id" />
8294                         <field name="runner" reporter:datatype="link"/>
8295                         <field name="start_time" reporter:datatype="timestamp"/>
8296                         <field name="complete_time" reporter:datatype="timestamp"/>
8297                         <field name="run_time" reporter:datatype="timestamp"/>
8298                         <field name="email" reporter:datatype="text"/>
8299                         <field name="excel_format" reporter:datatype="bool"/>
8300                         <field name="csv_format" reporter:datatype="bool"/>
8301                         <field name="html_format" reporter:datatype="bool"/>
8302                         <field name="error_code" reporter:datatype="int"/>
8303                         <field name="error_text" reporter:datatype="text"/>
8304                         <field name="report" reporter:datatype="link"/>
8305                         <field name="folder" reporter:datatype="link"/>
8306                         <field name="chart_pie" reporter:datatype="bool"/>
8307                         <field name="chart_bar" reporter:datatype="bool"/>
8308                         <field name="chart_line" reporter:datatype="bool"/>
8309                 </fields>
8310                 <links>
8311                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8312                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8313                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8314                 </links>
8315         </class>
8316         <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">
8317                 <fields oils_persist:primary="id">
8318                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8319                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8320                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8321                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8322                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8323                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8324                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8325                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8326                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8327                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8328                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8329                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8330                 </fields>
8331                 <links>
8332                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8333                 </links>
8334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8335                         <actions>
8336                                 <retrieve />
8337                         </actions>
8338                 </permacrud>
8339         </class>
8340         <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">
8341                 <fields oils_persist:primary="id">
8342                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8343                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8344                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8345                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8346                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8347                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8348                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8349                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8350                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8351                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8352                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8353                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8354                 </fields>
8355                 <links>
8356                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8357                 </links>
8358         </class>
8359         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8360                 <fields oils_persist:primary="id">
8361                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8362                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8363                         <field reporter:label="Fingerprint" name="fingerprint" />
8364                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8365                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8366                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8367                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8368                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8369                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8370                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8371                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8372                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8373                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8374                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8375                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8376                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8377                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8378                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8379                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8380                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8381                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8382                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8383                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8384                 </fields>
8385                 <links>
8386                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8387                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8388                 </links>
8389         </class>
8390         <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">
8391                 <fields oils_persist:primary="id">
8392                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8393                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8394                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8395                 </fields>
8396                 <links>
8397                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8398                 </links>
8399         </class>
8400         <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">
8401                 <fields oils_persist:primary="id">
8402                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8403                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8404                 </fields>
8405                 <links>
8406                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8407                 </links>
8408         </class>
8409         <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">
8410                 <fields oils_persist:primary="id">
8411                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8412                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8413                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8414                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8415                 </fields>
8416                 <links>
8417                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8418                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8419                 </links>
8420         </class>
8421         <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">
8422                 <fields oils_persist:primary="xact">
8423                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8424                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8425                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8426                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8427                 </fields>
8428                 <links>
8429                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8430                 </links>
8431         </class>
8432         <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">
8433                 <fields oils_persist:primary="xact">
8434                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8435                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8436                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8437                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8438                 </fields>
8439                 <links>
8440                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8441                 </links>
8442         </class>
8443         <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)">
8444                 <fields oils_persist:primary="id">
8445                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8446                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8447                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8448                 </fields>
8449                 <links>
8450                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8451                 </links>
8452         </class>
8453         <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">
8454                 <fields oils_persist:primary="id">
8455                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8456                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8457                 </fields>
8458                 <links>
8459                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8460                 </links>
8461         </class>
8462         <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">
8463                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8464                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
8465                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8466                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8467                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8468                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8469                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8470                 </fields>
8471                 <links>
8472                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8473                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8474                 </links>
8475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8476                         <actions>
8477                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8478                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8479                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8480                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8481                         </actions>
8482                 </permacrud>
8483         </class>
8484         <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">
8485                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8486                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8487                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8488                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8489                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8490                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8491                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8492                 </fields>
8493                 <links>
8494                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8495                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8496                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8497                 </links>
8498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8499                         <actions>
8500                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8501                                         <context link="formula" field="owner"/>
8502                                 </create>
8503                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8504                                         <context link="formula" field="owner"/>
8505                                 </retrieve>
8506                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8507                                         <context link="formula" field="owner"/>
8508                                 </update>
8509                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8510                                         <context link="formula" field="owner"/>
8511                                 </delete>
8512                         </actions>
8513                 </permacrud>
8514         </class>
8515
8516         <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">
8517                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8518                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8519                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8520                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8521                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8522                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8523                 </fields>
8524                 <links>
8525                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8526                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8527                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8528                 </links>
8529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8530                         <actions>
8531                                 <create permission="CREATE_PURCHASE_ORDER">
8532                                         <context link="formula" field="owner"/>
8533                 </create>
8534                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8535                                         <context link="formula" field="owner"/>
8536                 </retrieve>
8537                                 <update permission="CREATE_PURCHASE_ORDER">
8538                                         <context link="formula" field="owner"/>
8539                 </update>
8540                                 <delete permission="CREATE_PURCHASE_ORDER">
8541                                         <context link="formula" field="owner"/>
8542                 </delete>
8543                         </actions>
8544                 </permacrud>
8545         </class>
8546
8547         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8548                 <fields oils_persist:primary="id">
8549                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8550                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8551                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8552                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8553                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8554                 </fields>
8555                 <links>
8556                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8557                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8558                 </links>
8559         </class>
8560
8561         <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">
8562                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8563                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8564                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8565                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8566                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8567                 </fields>
8568                 <links>
8569                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8570                 </links>
8571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8572                         <actions>
8573                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8574                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8575                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8576                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8577                         </actions>
8578                 </permacrud>
8579         </class>
8580
8581         <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">
8582                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8583                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8584                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8585                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8586                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8587                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8588                 </fields>
8589                 <links>
8590                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8591                 </links>
8592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8593                         <actions>
8594                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8595                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8596                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8597                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8598                         </actions>
8599                 </permacrud>
8600         </class>
8601
8602         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8603                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8604                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8605                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8606                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8607                 </fields>
8608                 <links>
8609                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8610                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8611                 </links>
8612         </class>
8613
8614         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8615                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8616                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8617                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8618                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8619                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8620                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8621                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8622                 </fields>
8623                 <links>
8624                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8625                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8626                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8627                 </links>
8628         </class>
8629
8630         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8631                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8632                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8633                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8634                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8635                 </fields>
8636                 <links>
8637                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8638                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8639                 </links>
8640         </class>
8641
8642         <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">
8643                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8644                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8645                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8646                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8647                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8648                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8649                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8650                 </fields>
8651                 <links>
8652                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8653                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8654                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8655                 </links>
8656         </class>
8657
8658         <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">
8659                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8660                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8661                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8662                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8663                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8664                 </fields>
8665                 <links>
8666                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8667                 </links>
8668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8669             <actions>
8670                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8671                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8672                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8673                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8674             </actions>
8675                 </permacrud>
8676         </class>
8677
8678         <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">
8679                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8680                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8681                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8682                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8683                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8684                 </fields>
8685                 <links>
8686                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8687                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8688                 </links>
8689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8690                         <actions>
8691                                 <create permission="ADMIN_CLAIM_POLICY">
8692                                         <context link="claim_policy" field="org_unit"/>
8693                 </create>
8694                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8695                                         <context link="claim_policy" field="org_unit"/>
8696                 </retrieve>
8697                                 <update permission="ADMIN_CLAIM_POLICY">
8698                                         <context link="claim_policy" field="org_unit"/>
8699                 </update>
8700                                 <delete permission="ADMIN_CLAIM_POLICY">
8701                                         <context link="claim_policy" field="org_unit"/>
8702                 </delete>
8703                         </actions>
8704                 </permacrud>
8705         </class>
8706
8707     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8708         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8709             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8710             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8711             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8712             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8713             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8714             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8715             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8716             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8717             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8718             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8719             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8720             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8721             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8722             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8723             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8724         </fields>
8725     </class>
8726
8727     <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">
8728         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8729             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8730             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8731             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8732             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8733             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8734         </fields>
8735     </class>
8736
8737     <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">
8738         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8739             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8740             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8741             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8742             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8743             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8744             <field reporter:label="City" name="city" reporter:datatype="text"/>
8745             <field reporter:label="State" name="state" reporter:datatype="text"/>
8746             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8747             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8748             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8749         </fields>
8750     </class>
8751
8752     <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">
8753         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8754             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8755             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8756             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8757             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8758             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8759             <field reporter:label="City" name="city" reporter:datatype="text"/>
8760             <field reporter:label="State" name="state" reporter:datatype="text"/>
8761             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8762             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8763             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8764         </fields>
8765     </class>
8766
8767     <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">
8768         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8769             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8770             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8771             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8772             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8773             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8774             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8775         </fields>
8776     </class>
8777
8778         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8779                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8780                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8781                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8782                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8783                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8784                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8785                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8786                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8787                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8788                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8789                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8790                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8791                 </fields>
8792                 <links>
8793                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8794                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8795                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8796                 </links>
8797         </class>
8798
8799         <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">
8800                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8801                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8802                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8803                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8804                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8805                 </fields>
8806                 <links>
8807                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8808                 </links>
8809         </class>
8810
8811     <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">
8812         <fields>
8813             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8814             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8815             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8816         </fields>
8817                 <links>
8818                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8819                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8820                 </links>
8821     </class>
8822
8823     <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">
8824         <fields>
8825             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8826             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8827         </fields>
8828                 <links>
8829                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8830                 </links>
8831     </class>
8832
8833     <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">
8834         <fields>
8835             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8836             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8837             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8838         </fields>
8839                 <links>
8840                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8841                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8842                 </links>
8843     </class>
8844
8845     <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">
8846         <fields>
8847             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8848             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8849         </fields>
8850                 <links>
8851                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8852                 </links>
8853     </class>
8854
8855     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8856                 <oils_persist:source_definition>
8857
8858             SELECT  DISTINCT l.*
8859               FROM  action.unfulfilled_hold_loops l
8860                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8861               WHERE l.count = m.max
8862
8863                 </oils_persist:source_definition>
8864         <fields>
8865             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8866             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8867             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8868         </fields>
8869                 <links>
8870                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8871                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8872                 </links>
8873     </class>
8874
8875         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8876                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8877                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8878                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8879                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8880                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8881                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8882                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8883                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8884                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8885                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8886                 </fields>
8887                 <links>
8888                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8889                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8890                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8891                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8892                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8893                 </links>
8894         </class>
8895
8896         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8897                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8898                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8899                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8900                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8901                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8902                 </fields>
8903                 <links>
8904                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8905                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8906                 </links>
8907         </class>
8908
8909         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8910                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8911                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8912                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8913                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8914                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8915                 </fields>
8916                 <links>
8917                 </links>
8918         </class>
8919
8920         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8921                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8922                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8923                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8924                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8925                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8926                 </fields>
8927                 <links>
8928                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8929                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8930                 </links>
8931         </class>
8932         
8933         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8934                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8935                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8936                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8937                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8938                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8939                 </fields>
8940                 <links>
8941                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8942                 </links>
8943         </class>
8944         
8945         <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">
8946                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8947                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8948                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8949                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8950                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8951                 </fields>
8952                 <links>
8953                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8954                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8955                 </links>
8956         </class>
8957
8958         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8959                 <fields oils_persist:primary="name">
8960                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8961                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8962                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8963                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8964                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8965                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8966                 </fields>
8967                 <links>
8968                 </links>
8969         </class>
8970
8971         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8972                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8973                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8974                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8975                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8976                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8977                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8978                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8979                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8980                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8981                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8982                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8983                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8984                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8985                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8986                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8987                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8988                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8989                 </fields>
8990                 <links>
8991                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8992                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8993                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8994                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8995                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8996                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8997                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8998                 </links>
8999         </class>
9000
9001         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9002                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9003                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9004                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9005                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9006                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9007                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9008                 </fields>
9009                 <links>
9010                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9011                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9012                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9013                 </links>
9014         </class>
9015
9016         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9017                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9018                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9019                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9020                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9021                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9022                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9023                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9024                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9025                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9026                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9027                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9028                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9029                 </fields>
9030                 <links>
9031                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9032                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9033                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9034                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9035                 </links>
9036         </class>
9037
9038         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9039                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9040                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9041                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9042                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9043                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9044                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9045                 </fields>
9046                 <links>
9047                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9048                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9049                 </links>
9050         </class>
9051
9052         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9053                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9054                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9055                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9056                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9057                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9058                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9059                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9060                 </fields>
9061                 <links>
9062                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9063                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9064                 </links>
9065         </class>
9066
9067         <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">
9068                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9069                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9070                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9071                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9072                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9073                 </fields>
9074                 <links>
9075                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9076                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9077                 </links>
9078         </class>
9079
9080         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9081                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9082                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9083                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9084                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9085                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9086                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9087                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9088                 </fields>
9089                 <links>
9090                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9091                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9092                 </links>
9093         </class>
9094
9095         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9096                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9097                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9098                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9099                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9100                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9101                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9102                 </fields>
9103                 <links>
9104                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9105                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9106                 </links>
9107         </class>
9108
9109         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9110                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9111                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9112                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9113                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9114                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9115                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9116                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9117                 </fields>
9118                 <links>
9119                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9120                 </links>
9121         </class>
9122
9123         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9124                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9125                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9126                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9127                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9128                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9129                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9130                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9131                 </fields>
9132                 <links>
9133                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9134                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9135                 </links>
9136         </class>
9137
9138         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9139                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9140                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9141                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9142                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9143                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9144                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9145                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9146                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9147                 </fields>
9148                 <links>
9149                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9150                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9151                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9152                 </links>
9153         </class>
9154
9155         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9156                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9157                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9158                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9159                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9160                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9161                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9162                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9163                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9164                 </fields>
9165                 <links>
9166                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9167                 </links>
9168         </class>
9169
9170         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9171                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9172                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9173                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9174                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9175                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9176                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9177                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9178                 </fields>
9179                 <links>
9180                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9181                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9182                 </links>
9183         </class>
9184
9185         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9186                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9187                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9188                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9189                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9190                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9191                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9192                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9193                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9194                 </fields>
9195                 <links>
9196                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9197                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9198                 </links>
9199         </class>
9200
9201         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9202                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9203                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9204                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9205                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9206                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9207                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9208                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9209                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9210                 </fields>
9211                 <links>
9212                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9213                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9214                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9215                 </links>
9216         </class>
9217
9218         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9219                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9220                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9221                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9222                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9223                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9224                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9225                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9226                 </fields>
9227                 <links>
9228                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9229                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9230                 </links>
9231         </class>
9232
9233         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9234                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9235                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9236                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9237                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9238                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9239                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9240                 </fields>
9241                 <links>
9242                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9243                 </links>
9244         </class>
9245
9246         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9247                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9248                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9249                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9250                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9251                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9252                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9253                 </fields>
9254                 <links>
9255                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9256                 </links>
9257         </class>
9258
9259         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9260                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9261                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9262                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9263                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9264                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9265                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9266                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9267                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9268                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9269                 </fields>
9270                 <links>
9271                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9272                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9273                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9274                 </links>
9275         </class>
9276
9277         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9278                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9279                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9280                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9281                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9282                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9283                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9284                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9285                 </fields>
9286                 <links>
9287                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9288                 </links>
9289         </class>
9290
9291         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9292                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9293                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9294                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9295                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9296                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9297                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9298                 </fields>
9299                 <links>
9300                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9301                 </links>
9302         </class>
9303
9304         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9305                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9306                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9307                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9308                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9309                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9310                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9311                 </fields>
9312                 <links>
9313                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9314                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9315                 </links>
9316         </class>
9317
9318         <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">
9319                 <fields oils_persist:primary="id">
9320                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9321                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9322                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9323                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9324                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9325                 </fields>
9326                 <links>
9327                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9328                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9329                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9330                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9331                 </links>
9332         </class>
9333
9334         <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">
9335                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9336                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9337                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9338                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9339                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9340                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9341                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9342                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9343                 </fields>
9344                 <links/>
9345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9346                         <actions>
9347                                 <retrieve/>
9348                         </actions>
9349                 </permacrud>
9350         </class>
9351
9352         <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">
9353                 <fields oils_persist:primary="ptype_key">
9354                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9355                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9356                 </fields>
9357                 <links/>
9358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9359                         <actions>
9360                                 <retrieve/>
9361                         </actions>
9362                 </permacrud>
9363         </class>
9364
9365         <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">
9366                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9367                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9368                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9369                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9370                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9371                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9372                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9373                 </fields>
9374                 <links>
9375                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9376                 </links>
9377                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9378                         <actions>
9379                                 <retrieve/>
9380                         </actions>
9381                 </permacrud>
9382         </class>
9383
9384         <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">
9385                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9386                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9387                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9388                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9389                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9390                 </fields>
9391                 <links>
9392                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9393                 </links>
9394                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9395                         <actions>
9396                                 <retrieve/>
9397                         </actions>
9398                 </permacrud>
9399         </class>
9400
9401     <class
9402         id="uvs"
9403         controller="open-ils.cstore open-ils.pcrud"
9404         oils_obj:fieldmapper="url_verify::session"
9405         oils_persist:tablename="url_verify.session"
9406         reporter:label="URL Verification Session"
9407     >
9408         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9409             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9410             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9411                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9412             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9413             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9414             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9415             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9416             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9417             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9418         </fields>
9419
9420         <links>
9421             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9422             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9423             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9424             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9425             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9426         </links>
9427
9428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9429             <actions>
9430                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9431             </actions>
9432         </permacrud>
9433
9434     </class>
9435
9436     <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">
9437         <oils_persist:source_definition>
9438             SELECT
9439                 cbrebi.id AS id,  -- so we can have a pkey in our view
9440                 uvs.id AS session,
9441                 uvs.owning_lib,
9442                 cbrebi.target_biblio_record_entry
9443             FROM url_verify.session uvs
9444             JOIN container.biblio_record_entry_bucket cbreb
9445                 ON (uvs.container = cbreb.id)
9446             JOIN container.biblio_record_entry_bucket_item cbrebi
9447                 ON (cbrebi.bucket = cbreb.id)
9448         </oils_persist:source_definition>
9449         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9450             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9451             <field reporter:label="Session" name="session" reporter:datatype="link" />
9452             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9453             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9454         </fields>
9455         <links>
9456             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9457             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9458             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9459         </links>
9460         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9461             <actions>
9462                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9463             </actions>
9464         </permacrud>
9465     </class>
9466
9467     <class
9468         id="uvus"
9469         controller="open-ils.cstore open-ils.pcrud"
9470         oils_obj:fieldmapper="url_verify::url_selector"
9471         oils_persist:tablename="url_verify.url_selector"
9472         reporter:label="URL Verification URL Selector"
9473     >
9474         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9475             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9476             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9477                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9478             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9479         </fields>
9480
9481         <links>
9482             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9483             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9484         </links>
9485
9486         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9487             <actions>
9488                 <create permission="URL_VERIFY">
9489                     <context link="session" field="owning_lib"/>
9490                 </create>
9491                 <retrieve permission="URL_VERIFY">
9492                     <context link="session" field="owning_lib"/>
9493                 </retrieve>
9494                 <update permission="URL_VERIFY">
9495                     <context link="session" field="owning_lib"/>
9496                 </update>
9497                 <delete permission="URL_VERIFY">
9498                     <context link="session" field="owning_lib"/>
9499                 </delete>
9500             </actions>
9501         </permacrud>
9502
9503     </class>
9504
9505     <class
9506         id="uvu"
9507         controller="open-ils.cstore open-ils.pcrud"
9508         oils_obj:fieldmapper="url_verify::url"
9509         oils_persist:tablename="url_verify.url"
9510         reporter:label="URL Verification URL"
9511     >
9512         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9513             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9514                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9515                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9516                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9517                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9518             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9519             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9520             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9521             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9522             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9523             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9524             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9525             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9526             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9527             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9528             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9529             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9530             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9531         </fields>
9532
9533         <links>
9534             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9535             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9536             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9537             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9538             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9539         </links>
9540
9541         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9542             <actions>
9543                 <create permission="URL_VERIFY">
9544                     <context link="session" field="owning_lib"/>
9545                 </create>
9546                 <retrieve permission="URL_VERIFY">
9547                     <context link="session" field="owning_lib"/>
9548                 </retrieve>
9549                 <update permission="URL_VERIFY">
9550                     <context link="session" field="owning_lib"/>
9551                 </update>
9552                 <delete permission="URL_VERIFY">
9553                     <context link="session" field="owning_lib"/>
9554                 </delete>
9555             </actions>
9556         </permacrud>
9557
9558     </class>
9559
9560     <class
9561         id="uvva"
9562         controller="open-ils.cstore open-ils.pcrud"
9563         oils_obj:fieldmapper="url_verify::verification_attempt"
9564         oils_persist:tablename="url_verify.verification_attempt"
9565         reporter:label="URL Verification Attempt"
9566     >
9567         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9568             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9569                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9570                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9571             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9572             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9573         </fields>
9574
9575         <links>
9576             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9577             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9578         </links>
9579
9580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9581             <actions>
9582                 <create permission="URL_VERIFY">
9583                     <context link="session" field="owning_lib"/>
9584                 </create>
9585                 <retrieve permission="URL_VERIFY">
9586                     <context link="session" field="owning_lib"/>
9587                 </retrieve>
9588                 <update permission="URL_VERIFY">
9589                     <context link="session" field="owning_lib"/>
9590                 </update>
9591                 <delete permission="URL_VERIFY">
9592                     <context link="session" field="owning_lib"/>
9593                 </delete>
9594             </actions>
9595         </permacrud>
9596
9597     </class>
9598
9599     <class
9600         id="uvuv"
9601         controller="open-ils.cstore open-ils.pcrud"
9602         oils_obj:fieldmapper="url_verify::url_verification"
9603         oils_persist:tablename="url_verify.url_verification"
9604         reporter:label="URL Verification"
9605     >
9606         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9607             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9608                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9609                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9610             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9611             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9612             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9613             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9614                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9615         </fields>
9616
9617         <links>
9618             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9619             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9620             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9621         </links>
9622
9623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9624             <actions>
9625                 <create permission="URL_VERIFY">
9626                     <context link="attempt" jump="session" field="owning_lib"/>
9627                 </create>
9628                 <retrieve permission="URL_VERIFY">
9629                     <context link="attempt" jump="session" field="owning_lib"/>
9630                 </retrieve>
9631                 <update permission="URL_VERIFY">
9632                     <context link="attempt" jump="session" field="owning_lib"/>
9633                 </update>
9634                 <delete permission="URL_VERIFY">
9635                     <context link="attempt" jump="session" field="owning_lib"/>
9636                 </delete>
9637             </actions>
9638         </permacrud>
9639
9640     </class>
9641
9642         <class
9643                 id="cfdi"
9644                 controller="open-ils.cstore open-ils.pcrud"
9645                 oils_obj:fieldmapper="config::filter_dialog_interface"
9646                 oils_persist:tablename="config.filter_dialog_interface"
9647                 reporter:label="FilterDialog Interface">
9648                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9649                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9650                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9651                 </fields>
9652                 <links>
9653                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9654                 </links>
9655                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9656                         <actions>
9657                                 <retrieve />
9658                         </actions>
9659                 </permacrud>
9660         </class>
9661
9662         <class
9663                 id="cfdfs"
9664                 controller="open-ils.cstore open-ils.pcrud"
9665                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9666                 oils_persist:tablename="config.filter_dialog_filter_set"
9667                 reporter:label="FilterDialog Filter Set">
9668                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9669                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9670                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9671                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9672                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9673                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9674                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9675                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9676                 </fields>
9677                 <links>
9678                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9679                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9680                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9681                 </links>
9682                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9683                         <actions>
9684                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9685                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9686                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9687                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9688                         </actions>
9689                 </permacrud>
9690
9691         </class>
9692
9693         <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">
9694                 <fields oils_persist:primary="code">
9695                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9696                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9697                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9698                 </fields>
9699                 <links/>
9700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9701                         <actions>
9702                                 <retrieve/>
9703                         </actions>
9704                 </permacrud>
9705         </class>
9706
9707         <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">
9708                 <oils_persist:source_definition>
9709
9710             SELECT  b.id,
9711                     MAX(dcp.edit_date) AS last_delete_date
9712              FROM   biblio.record_entry b
9713                     JOIN asset.call_number cn ON (cn.record = b.id)
9714                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9715              WHERE  NOT b.deleted
9716              GROUP BY b.id
9717              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9718
9719                 </oils_persist:source_definition>
9720                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9721                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9722                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9723                 </fields>
9724                 <links>
9725                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9726                 </links>
9727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9728                         <actions>
9729                                 <retrieve/>
9730                         </actions>
9731                 </permacrud>
9732         </class>
9733
9734         <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">
9735                 <oils_persist:source_definition>
9736
9737             -- -- 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.
9738             -- -- 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
9739             -- -- may not.
9740             -- SELECT
9741             --     bre.id AS "bib_id",
9742             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9743             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9744             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9745             -- FROM (
9746                 SELECT
9747                     y.bre AS "id",
9748                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9749                     y.hold_count AS "hold_count",
9750                     (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"
9751                 FROM (
9752                         SELECT
9753                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9754                             COUNT(*) AS "hold_count"
9755                         FROM action.hold_request h
9756                         WHERE
9757                             cancel_time IS NULL
9758                             AND fulfillment_time IS NULL
9759                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9760                         GROUP BY 1
9761                     )y LEFT JOIN (
9762                         SELECT 
9763                             (SELECT id
9764                                 FROM biblio.record_entry 
9765                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9766                             ) AS "bre", 
9767                             COUNT(*) AS "copy_count"
9768                         FROM asset.copy
9769                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9770                         WHERE copy.holdable 
9771                             AND NOT copy.deleted 
9772                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9773                         GROUP BY 1
9774                     )x ON x.bre = y.bre
9775                 -- )z RIGHT JOIN (
9776                 --     SELECT id
9777                 --     FROM biblio.record_entry
9778                 --     WHERE NOT deleted
9779                 -- )bre ON (z.bib_id = bre.id)
9780                 
9781
9782                 </oils_persist:source_definition>
9783                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9784                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9785                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9786                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9787                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9788                 </fields>
9789                 <links>
9790                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9791                 </links>
9792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9793                         <actions>
9794                                 <retrieve/>
9795                         </actions>
9796                 </permacrud>
9797         </class>
9798
9799         <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">
9800                 <oils_persist:source_definition>
9801             SELECT *,
9802                 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,
9803                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9804             FROM
9805                 (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
9806                     FROM
9807                         action.hold_request ahr
9808                         JOIN reporter.hold_request_record rhrr USING (id)
9809                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9810                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9811                     WHERE
9812                         ahr.cancel_time IS NULL
9813                         AND ahr.fulfillment_time IS NULL
9814                     GROUP BY bib_record, pickup_lib
9815                 )x
9816                 JOIN
9817                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9818                     FROM
9819                         action.hold_request ahr
9820                         JOIN reporter.hold_request_record rhrr USING (id)
9821                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9822                     WHERE
9823                         ahr.cancel_time IS NULL
9824                         AND ahr.fulfillment_time IS NULL
9825                     GROUP BY bib_record
9826                 )y
9827                 USING (id)
9828                 </oils_persist:source_definition>
9829                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9830                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9831                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9832                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9833                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9834                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9835                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9836                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9837                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9838                 </fields>
9839                 <links>
9840                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9841                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9842                 </links>
9843                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9844                         <actions>
9845                                 <retrieve/>
9846                         </actions>
9847                 </permacrud>
9848         </class>
9849
9850         <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">
9851                 <oils_persist:source_definition>
9852             SELECT
9853                 ac.id,
9854                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9855                 MAX(actac.xact_start) AS last_circ
9856             FROM asset.copy ac
9857                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9858             GROUP BY ac.id
9859
9860             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9861             --SELECT
9862             --    ac.id,
9863             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9864             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9865             --FROM asset.copy ac
9866             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9867             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9868             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9869                 </oils_persist:source_definition>
9870                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9871                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9872                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9873                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9874                 </fields>
9875                 <links>
9876                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9877                 </links>
9878                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9879                         <actions>
9880                                 <retrieve/>
9881                         </actions>
9882                 </permacrud>
9883         </class>
9884
9885         <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">
9886                 <fields oils_persist:primary="id">
9887                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
9888                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
9889                 </fields>
9890                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9891                         <actions>
9892                                 <retrieve/>
9893                         </actions>
9894                 </permacrud>
9895         </class>
9896
9897         <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">
9898                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
9899                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
9900                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
9901                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
9902                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
9903                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
9904                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
9905                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
9906                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
9907                 </fields>
9908                 <links>
9909                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
9910                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
9911                 </links>
9912                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9913                         <actions>
9914                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9915                                 <retrieve/>
9916                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9917                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9918                         </actions>
9919                 </permacrud>
9920         </class>
9921
9922         <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">
9923                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
9924                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
9925                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
9926                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
9927                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
9928                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
9929                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
9930                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
9931                 </fields>
9932                 <links>
9933                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
9934                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
9935                 </links>
9936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9937                         <actions>
9938                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9939                                 <retrieve/>
9940                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9941                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9942                         </actions>
9943                 </permacrud>
9944         </class>
9945
9946
9947         <!-- ********************************************************************************************************************* -->
9948         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9949         <!-- ********************************************************************************************************************* -->
9950         <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">
9951                 <fields oils_persist:primary="id">
9952                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9953                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9954                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9955                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9956                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9957                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
9958                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9959                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
9960                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
9961                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
9962                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
9963                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
9964                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
9965                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
9966                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9967                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
9968                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
9969                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
9970                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
9971                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
9972                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
9973                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
9974                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
9975                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
9976                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
9977                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
9978                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
9979                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
9980                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
9981                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9982                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9983                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9984                 </fields>
9985                 <links>
9986                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9987                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
9988                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
9989                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
9990                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
9991                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
9992                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
9993                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
9994                 </links>
9995         </class>
9996
9997         <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">
9998                 <fields oils_persist:primary="id">
9999                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10000                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10001                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10002                 </fields>
10003                 <links>
10004                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10005                 </links>
10006         </class>
10007
10008         <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">
10009                 <fields oils_persist:primary="id">
10010                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10011                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10012                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10013                 </fields>
10014                 <links>
10015                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10016                 </links>
10017         </class>
10018
10019         <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">
10020                 <fields oils_persist:primary="id">
10021                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10022
10023                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10024                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10025                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10026
10027                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10028                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10029                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10030
10031                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10032                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10033
10034                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10035                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10036                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10037
10038                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10039                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10040
10041                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10042                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10043                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10044
10045                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10046                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10047                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10048
10049                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10050                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10051                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10052                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10053
10054                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10055                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10056
10057                 </fields>
10058                 <links>
10059                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10060                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10061                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10062                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10063                 </links>
10064         </class>
10065
10066         <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">
10067                 <oils_persist:source_definition>
10068
10069             SELECT
10070                 po.ordering_agency AS ordering_agency,
10071                 po.id AS purchase_order,
10072                 li.id AS lineitem,
10073                 lid.id AS lineitem_detail,
10074                 cpa.id AS claim_policy_action
10075             FROM
10076                 acq.lineitem_detail lid
10077                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10078                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10079                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10080                 JOIN acq.claim_policy_action cpa ON (
10081                     cpa.claim_policy = cp.id
10082
10083                     -- we only care about claim policy actions whose claim
10084                     -- interval we'd reached or exceeded
10085                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10086
10087                     -- filter out all claim policy actions where claim events
10088                     -- have occurred on or after the action's action_interval
10089                     AND NOT EXISTS (
10090                         SELECT 1
10091                         FROM
10092                             acq.claim_event evt
10093                             JOIN acq.claim claim ON (
10094                                 claim.id = evt.claim
10095                                 AND claim.lineitem_detail = lid.id
10096                             )
10097                         WHERE
10098                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10099                     )
10100                 )
10101             WHERE
10102                 lid.cancel_reason IS NULL
10103                 AND li.cancel_reason IS NULL -- belt/suspenders
10104                 AND po.cancel_reason IS NULL -- belt/suspenders
10105                 AND lid.recv_time IS NULL
10106                 AND po.state = 'on-order'
10107             ORDER BY 1, 2, 3, 4, 5
10108
10109                 </oils_persist:source_definition>
10110                 <fields>
10111                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10112                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10113                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10114                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10115                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10116                 </fields>
10117                 <links>
10118                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10119                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10120                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10121                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10122                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10123                 </links>
10124         </class>
10125         <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">
10126                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10127                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10128                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10129                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10130                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10131                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10132                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10133                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10134                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10135                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10136                 </fields>
10137                 <links>
10138                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10139                 </links>
10140     </class>
10141         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10142                 <oils_persist:source_definition>
10143             SELECT * FROM acq.lineitem_summary 
10144                                 WHERE item_count > (invoice_count + cancel_count)
10145         </oils_persist:source_definition>
10146                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10147                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10148                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10149                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10150                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10151                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10152                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10153                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10154                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10155                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10156                 </fields>
10157                 <links>
10158                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10159                 </links>
10160     </class>
10161         <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">
10162                 <oils_persist:source_definition>
10163
10164                         SELECT  t.*
10165                           FROM  action.transit_copy t
10166                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10167                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10168                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10169
10170                 </oils_persist:source_definition>
10171                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10172                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10173                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10174                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10175                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10176                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10177                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10178                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10179                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10180                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10181                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10182                 </fields>
10183                 <links>
10184                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10185                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10186                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10187                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10188                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10189                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10190                 </links>
10191         </class>
10192
10193     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10194                 <oils_persist:source_definition>
10195
10196         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10197                 SELECT
10198                         cp.id as copy,
10199                         COUNT(circ.id),
10200                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10201                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10202                 FROM
10203                         asset.copy cp
10204                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10205                 GROUP BY 1, 3, 4
10206                 UNION
10207                 SELECT
10208                         cp.id as copy,
10209                         COUNT(circ.id),
10210                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10211                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10212                 FROM
10213                         asset.copy cp
10214                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10215                 GROUP BY 1, 3, 4
10216                 UNION
10217                 SELECT
10218                         id as copy,
10219                         circ_count,
10220                         -1 AS year,
10221                         false as is_renewal
10222                 FROM
10223                         extend_reporter.legacy_circ_count
10224         )x GROUP BY 1, 3, 4
10225
10226                 </oils_persist:source_definition>
10227         <fields>
10228             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10229             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10230             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10231             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10232         </fields>
10233                 <links>
10234                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10235                 </links>
10236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10237                         <actions>
10238                                 <retrieve/>
10239                         </actions>
10240                 </permacrud>
10241     </class>
10242
10243         <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">
10244                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10245                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10246                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10247                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10248                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10249                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10250                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10251                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10252                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10253                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10254                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10255                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10256                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10257                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10258                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10259                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10260                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10261                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10262                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10263                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10264                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10265                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10266                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10267                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10268                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10269                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10270                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10271                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10272                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10273                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10274                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10275                 </fields>
10276                 <links>
10277                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10278                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10279                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10280                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10281                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10282                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10283                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10284                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10285                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10286                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10287                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10288                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10289                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10290                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10291                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10292                 </links>
10293         </class>
10294
10295     <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">
10296         <fields oils_persist:primary="id">
10297             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10298             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10299             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10300             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10301             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10302             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10303             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10304             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10305             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10306             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10307             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10308             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10309             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10310             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10311             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10312             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10313             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10314             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10315             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10316             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10317             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10318             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10319             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10320             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10321             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10322             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10323             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10324             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10325             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10326             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10327             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10328             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10329             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10330             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10331         </fields>
10332         <links>
10333             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10334             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10335             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10336             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10337             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10338         </links>
10339     </class>
10340
10341     <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">
10342         <fields oils_persist:primary="id">
10343             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10344             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10345             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10346             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10347         </fields>
10348         <links>
10349             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10350             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10351         </links>
10352     </class>
10353
10354     <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">
10355         <fields oils_persist:primary="owning_lib">
10356             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10357             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10358             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10359         </fields>
10360         <links>
10361             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10362         </links>
10363     </class>
10364
10365     <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">
10366         <fields oils_persist:primary="id">
10367             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10368             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10369             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10370             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10371             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10372         </fields>
10373         <links>
10374             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10375             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10376             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10377         </links>
10378     </class>
10379
10380     <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">
10381         <fields oils_persist:primary="circ_lib">
10382             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10383             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10384             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10385             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10386         </fields>
10387         <links>
10388             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10389             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10390         </links>
10391     </class>
10392
10393     <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">
10394         <fields oils_persist:primary="id">
10395             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10396             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10397             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10398             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10399             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10400         </fields>
10401         <links>
10402             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10403             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10404             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10405         </links>
10406     </class>
10407
10408     <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">
10409         <fields oils_persist:primary="home_ou">
10410             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10411             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10412             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10413             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10414         </fields>
10415         <links>
10416             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10417             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10418         </links>
10419     </class>
10420         <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">
10421                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10422                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10423                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10424                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10425                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10426                 </fields>
10427                 <links>
10428                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10429                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10430                 </links>
10431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10432                         <actions>
10433                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10434                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10435                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10436                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10437                         </actions>
10438                 </permacrud>
10439         </class>
10440         <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">
10441                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10442                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10443                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10444                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10445                 </fields>
10446                 <links>
10447                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10448                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10449                         </links>
10450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10451                 <actions>
10452                                 <create permission="ADMIN_ACQ_FUND_TAG">
10453                                         <context link="tag" field="owner"/>
10454                                 </create>
10455                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10456                                         <context link="tag" field="owner"/>
10457                                 </retrieve>
10458                                 <update permission="ADMIN_ACQ_FUND_TAG">
10459                                         <context link="tag" field="owner"/>
10460                                 </update>
10461                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10462                                         <context link="tag" field="owner"/>
10463                                 </delete>
10464                         </actions>
10465                 </permacrud>
10466         </class>
10467         <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">
10468                 <oils_persist:source_definition><![CDATA[
10469                 SELECT
10470                         poi.purchase_order AS purchase_order,
10471                         ii.invoice AS invoice,
10472                         NULL AS lineitem,
10473                         poi.id AS po_item,
10474                         NULL AS picklist
10475                 FROM
10476                         acq.po_item poi
10477                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10478                 UNION SELECT
10479                         jub.purchase_order AS purchase_order,
10480                         ie.invoice AS invoice,
10481                         jub.id AS lineitem,
10482                         NULL AS po_item,
10483                         jub.picklist AS picklist
10484                 FROM
10485                         acq.lineitem jub
10486                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10487                 UNION SELECT
10488                         ii.purchase_order AS purchase_order,
10489                         ii.invoice AS invoice,
10490                         NULL AS lineitem,
10491                         NULL AS po_item,
10492                         NULL AS picklist
10493                 FROM
10494                         acq.invoice_item ii
10495                 WHERE ii.po_item IS NULL
10496                 UNION SELECT
10497                         ie.purchase_order AS purchase_order,
10498                         ie.invoice AS invoice,
10499                         NULL AS lineitem,
10500                         NULL AS po_item,
10501                         NULL AS picklist
10502                 FROM
10503                         acq.invoice_entry ie
10504                 WHERE ie.lineitem IS NULL
10505                 UNION SELECT
10506                         NULL AS purchase_order,
10507                         NULL AS invoice,
10508                         jub.id AS lineitem,
10509                         NULL AS po_item,
10510                         jub.picklist AS picklist
10511                 FROM
10512                         acq.lineitem jub
10513                 WHERE jub.purchase_order IS NULL
10514                 ]]></oils_persist:source_definition>
10515                 <fields>
10516                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10517                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10518                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10519                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10520                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10521                 </fields>
10522                 <links>
10523                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10524                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10525                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10526                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10527                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10528                 </links>
10529         </class>
10530         <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">
10531                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10532                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10533                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10534                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10535                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10536                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10537                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10538                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10539                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10540                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10541                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10542                 </fields>
10543                 <links>
10544                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10545                 </links>
10546                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10547                         <actions>
10548                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10549                                 <retrieve/>
10550                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10551                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10552                         </actions>
10553                 </permacrud>
10554         </class>
10555
10556         <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">
10557                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10558                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10559                         <field name="date_applied" reporter:datatype="timestamp"/>
10560                         <field name="org" reporter:datatype="org_unit"/>
10561                         <field name="original_value" reporter:datatype="text"/>
10562                         <field name="new_value" reporter:datatype="text"/>
10563                         <field name="field_name" reporter:datatype="link"/>
10564                 </fields>
10565                 <links>
10566                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10567                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10568                 </links>
10569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10570                         <actions>
10571                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10572                                 <retrieve/>
10573                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10574                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10575                         </actions>
10576                 </permacrud>
10577         </class>
10578         <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">
10579                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10580                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10581                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10582                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10583                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10584                 </fields>
10585                 <links>
10586                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10587                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10588                 </links>
10589         </class>
10590         <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">
10591                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10592                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10593                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10594                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10595                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10596                 </fields>
10597                 <links>
10598                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10599                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10600                 </links>
10601         </class>
10602
10603
10604         <!-- ********************************************************************************************************************* -->
10605
10606 </IDL>
10607
10608 <!--
10609     vim:noet:ts=4:sw=4:
10610 -->