]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Replace most of the serial schema with a different set of tables. Only
[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
24 <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">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                 </fields>
88         </class>
89
90         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
91                 <fields>
92                         <field name="err_msg" oils_persist:virtual="true" />
93                         <field name="type" oils_persist:virtual="true" />
94                 </fields>
95         </class>
96
97         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
98                 <fields>
99                         <field name="err_msg" oils_persist:virtual="true" />
100                         <field name="type" oils_persist:virtual="true" />
101                 </fields>
102         </class>
103
104         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
105                 <fields oils_persist:primary="matchpoint">
106                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
107                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
108                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
109                 </fields>
110                 <links>
111                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
112                 </links>
113         </class>
114
115         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
116         <!-- when the time is right, turn me into a view.  -->
117                 <fields>
118             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
119             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
120             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
121             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
122             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
123             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
124             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
125             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
127             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" datatype="timestamp"/>
128                 </fields>
129         </class>
130
131
132         <!-- Actually in the DB -->
133         <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">
134                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
135                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
136                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
137                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
138                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
139                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
140                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
141                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
142                 </fields>
143                 <links>
144                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
145                 </links>
146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
147                         <actions>
148                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
149                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
150                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
151                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
152                         </actions>
153                 </permacrud>
154         </class>
155
156         <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">
157                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
158                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
159                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
160                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
164                 </links>
165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
166                         <actions>
167                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
168                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
169                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
170                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
171                         </actions>
172                 </permacrud>
173         </class>
174
175         <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">
176                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
177                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
178                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
179                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
180                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
181                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
182                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
183                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
184                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
185                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
186                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
187                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
188                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
189                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
190                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
191                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
192                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
193                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
194                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
195                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
196                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
197                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
198                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
199                 </fields>
200                 <links>
201                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
202                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
203                 </links>
204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
205                         <actions>
206                                 <create permission="CREATE_IMPORT_ITEM">
207                     <context link="definition" field="owner"/>
208                                 </create>
209                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
210                     <context link="definition" field="owner"/>
211                                 </retrieve>
212                                 <update permission="UPDATE_IMPORT_ITEM">
213                     <context link="definition" field="owner"/>
214                                 </update>
215                                 <delete permission="DELETE_IMPORT_ITEM">
216                     <context link="definition" field="owner"/>
217                                 </delete>
218                         </actions>
219                 </permacrud>
220         </class>
221
222         <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">
223                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
224                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
225                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
226                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
227                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
228                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
229                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
230                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
231                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
232                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
233                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
234                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
235                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
236                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
237                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
238                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
239                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
240                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
241                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
242                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
243                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
244                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
245                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
246                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
247                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
248                 </fields>
249                 <links>
250                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
251                 </links>
252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
253                         <actions>
254                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
255                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
256                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
257                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
258                         </actions>
259                 </permacrud>
260         </class>
261
262         <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">
263                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
264                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
265                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
266                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
267                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
268                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
269                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
270                 </fields>
271                 <links>
272                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
273                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
274                 </links>
275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
276                         <actions>
277                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
278                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
279                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
280                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
281                         </actions>
282                 </permacrud>
283         </class>
284
285         <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">
286                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
287                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
288                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
289                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
290                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
291                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
292                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
293                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
294                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
295                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
296                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
297                 </fields>
298                 <links>
299                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
300                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
301                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
302             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
303             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
304                 </links>
305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
306                         <actions>
307                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
308                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
309                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
310                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
311                         </actions>
312                 </permacrud>
313         </class>
314
315         <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">
316                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
317                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
318                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
319                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
320                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
321                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
322                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
323                 </fields>
324                 <links/>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
328                 <retrieve/>
329                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
330                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <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">
336                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
337                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
338                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
339                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
340                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
341                 </fields>
342                 <links>
343                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
344                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
345                 </links>
346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
347                         <actions>
348                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
349                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
350                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
351                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
352                         </actions>
353                 </permacrud>
354         </class>
355
356         <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">
357                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
358                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
359                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
360                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
361                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
362                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
363                 </fields>
364                 <links>
365                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
366                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
367                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
368                 </links>
369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
370                         <actions>
371                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
372                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
373                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
374                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
375                         </actions>
376                 </permacrud>
377         </class>
378
379         <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">
380                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
381                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
382                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
383                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
384                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
385                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
386                 </fields>
387                 <links>
388                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
389                 </links>
390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
391                         <actions>
392                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
393                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
394                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
395                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
396                         </actions>
397                 </permacrud>
398         </class>
399
400         <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">
401                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
402                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
403                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
404                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
405                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
406                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
407                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
408                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
409                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
410                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
411                 </fields>
412                 <links>
413                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
414                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
415             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
416             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
417                 </links>
418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
419                         <actions>
420                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
421                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
422                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
423                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
424                         </actions>
425                 </permacrud>
426         </class>
427
428         <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">
429                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
430                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
431                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
432                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
433                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
434                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
435                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
436                 </fields>
437                 <links/>
438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
439                         <actions>
440                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
441                 <retrieve/>
442                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
443                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
444                         </actions>
445                 </permacrud>
446         </class>
447
448         <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">
449                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
450                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
451                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
452                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
453                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
454                 </fields>
455                 <links>
456                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
457                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
458                 </links>
459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
460                         <actions>
461                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
462                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
463                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
464                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
465                         </actions>
466                 </permacrud>
467         </class>
468
469         <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">
470                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
471                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
472                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
473                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
474                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
475                 </fields>
476                 <links>
477                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
478                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
479                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
480                 </links>
481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
482                         <actions>
483                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
484                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
485                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
486                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
487                         </actions>
488                 </permacrud>
489         </class>
490
491
492         <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">
493                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
494                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
495                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
496                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
497                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
498                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
499                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
500                 </fields>
501                 <links>
502                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
503                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
504                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
505                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
506                 </links>
507         </class>
508
509     <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">
510         <fields oils_persist:primary="name">
511             <field reporter:label="Name" name="name" reporter:datatype="text"/>
512             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
513             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
514             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
515         </fields>
516         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
517             <actions>
518                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
519                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
520                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
521                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
522             </actions>
523         </permacrud>
524     </class>
525
526     <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">
527         <fields oils_persist:primary="id">
528             <field reporter:label="ID" name="id" reporter:datatype="id"/>
529             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
530             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
531             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
532             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
533         </fields>
534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
535             <actions>
536                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
537                 <retrieve/>
538                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
539                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
540             </actions>
541         </permacrud>
542     </class>
543
544         <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">
545                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
546                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
547                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
548                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
549                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
550                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
551                 </fields>
552                 <links>
553                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
554                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
555                 </links>
556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
557             <actions>
558                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
559                 <retrieve/>
560                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
561                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
562             </actions>
563         </permacrud>
564         </class>
565
566         <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">
567                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
568                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
569                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
570                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
571                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
572                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
573                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
574                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
575                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
576                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
577                 </fields>
578                 <links>
579                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
580                 </links>
581         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
582             <actions>
583                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
584                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
585                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
586                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
587             </actions>
588         </permacrud>
589         </class>
590
591     <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">
592         <fields oils_persist:primary="name">
593             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
594             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
595             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
596             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
597             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
598             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
599             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
600             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
601             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
602         </fields>
603         <links>
604             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
605         </links>
606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
607             <actions>
608                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
609                 <retrieve/>
610                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
611                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
612             </actions>
613         </permacrud>
614     </class>
615
616     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
617         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
618             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
619             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
620             <field reporter:label="Name" name="name" reporter:datatype="text"/>
621             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
622             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
623             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
624             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
625         </fields>
626         <links>
627             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
628         </links>
629     </class>
630
631         <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">
632                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
633                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
634                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
635                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
636                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
637                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
638                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
639                 </fields>
640                 <links>
641             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
642             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
643                 </links>
644                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
645                         <actions>
646                                 <retrieve/>
647                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
648                         </actions>
649                 </permacrud>
650         </class>
651
652         <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">
653                 <fields oils_persist:primary="key">
654                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
655                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
656                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
657                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
658                 </fields>
659                 <links/>
660                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
661                         <actions>
662                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
663                                 <retrieve/>
664                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
665                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
666                         </actions>
667                 </permacrud>
668         </class>
669
670         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
671                 <fields oils_persist:primary="module">
672                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
673                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
674                 </fields>
675                 <links/>
676         </class>
677
678         <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">
679                 <fields oils_persist:primary="module">
680                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
681                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
682                 </fields>
683                 <links/>
684                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
685                         <actions>
686                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
687                                 <retrieve/>
688                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
689                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
690                         </actions>
691                 </permacrud>
692         </class>
693
694         <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">
695                 <fields oils_persist:primary="module">
696                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
697                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
698                 </fields>
699                 <links/>
700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
701                         <actions>
702                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
703                                 <retrieve/>
704                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
705                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
706                         </actions>
707                 </permacrud>
708         </class>
709
710         <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">
711                 <fields oils_persist:primary="module">
712                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
713                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
714                 </fields>
715                 <links/>
716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
717                         <actions>
718                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
719                                 <retrieve/>
720                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
721                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
722                         </actions>
723                 </permacrud>
724         </class>
725
726         <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">
727                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
728                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
729                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
730                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
731                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
732                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
733                 </fields>
734                 <links>
735                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
736                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
737                 </links>
738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
739                         <actions>
740                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
741                     <context link="event_def" field="owner"/>
742                 </create>
743                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
744                     <context link="event_def" field="owner"/>
745                 </retrieve>
746                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
747                     <context link="event_def" field="owner"/>
748                 </update>
749                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
750                     <context link="event_def" field="owner"/>
751                 </delete>
752                         </actions>
753                 </permacrud>
754         </class>
755
756         <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">
757                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
758                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
759                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
760                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
761                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
762                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
763                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
764                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
765                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
766                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
767                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
768                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
769                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
770                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
771                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
772                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
773                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
774                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
775                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
776                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
777                 </fields>
778                 <links>
779                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
780                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
781                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
782                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
783                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
784                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
785                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
786                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
787                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
792                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
793                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
794                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
795                         </actions>
796                 </permacrud>
797         </class>
798
799         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
800                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
801                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
802                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
803                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
804                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
805                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
806                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
807                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
808                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
809                         <field reporter:label="State" name="state" reporter:datatype="text"/>
810                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
811                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
812                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
813                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
814                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
815                 </fields>
816                 <links>
817                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
818                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
819                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
820                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
821                 </links>
822         </class>
823
824         <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">
825                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
826                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
827                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
828                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
829                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
830                 </fields>
831                 <links>
832                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
833                 </links>
834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
835                         <actions>
836                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
837                     <context link="event_def" field="owner"/>
838                 </create>
839                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
840                     <context link="event_def" field="owner"/>
841                 </retrieve>
842                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
843                     <context link="event_def" field="owner"/>
844                 </update>
845                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
846                     <context link="event_def" field="owner"/>
847                 </delete>
848                         </actions>
849                 </permacrud>
850         </class>
851
852         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
853                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
854                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
855                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
856                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
857                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
858                 </fields>
859                 <links>
860                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
861                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
862                 </links>
863         </class>
864
865         <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">
866                 <fields oils_persist:primary="code">
867                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
868                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
869                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
870                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
871                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
872                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
873                 </fields>
874                 <links/>
875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
876             <actions>
877                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
878                 <retrieve/>
879                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
880                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
881             </actions>
882         </permacrud>
883         </class>
884
885         <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">
886                 <fields oils_persist:primary="code">
887                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
888                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
889                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
890                 </fields>
891                 <links/>
892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
893             <actions>
894                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
895                 <retrieve/>
896                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
897                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
898             </actions>
899         </permacrud>
900         </class>
901
902         <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">
903                 <fields oils_persist:primary="code">
904                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
905                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
906                 </fields>
907                 <links/>
908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
909             <actions>
910                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
911                 <retrieve/>
912                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
913                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
914             </actions>
915         </permacrud>
916         </class>
917
918         <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">
919                 <fields oils_persist:primary="code">
920                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
921                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
922                 </fields>
923                 <links/>
924         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
925             <actions>
926                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
927                 <retrieve/>
928                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
929                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
930             </actions>
931         </permacrud>
932         </class>
933
934         <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">
935                 <fields oils_persist:primary="code">
936                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
937                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
938                 </fields>
939                 <links/>
940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
941             <actions>
942                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
943                 <retrieve/>
944                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
945                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
946             </actions>
947         </permacrud>
948         </class>
949
950         <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">
951                 <fields oils_persist:primary="code">
952                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
953                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
954                 </fields>
955                 <links/>
956         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
957             <actions>
958                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
959                 <retrieve/>
960                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
961                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
962             </actions>
963         </permacrud>
964         </class>
965
966         <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">
967                 <fields oils_persist:primary="code">
968                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
969                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
970                 </fields>
971                 <links/>
972         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
973             <actions>
974                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
975                 <retrieve/>
976                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
977                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
978             </actions>
979         </permacrud>
980         </class>
981
982         <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">
983                 <fields oils_persist:primary="code">
984                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
985                         <field reporter:label="Format" name="value" 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_MARC_CODE" global_required="true"/>
991                 <retrieve/>
992                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
993                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
994             </actions>
995         </permacrud>
996         </class>
997
998         <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">
999                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1000                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1001                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1002                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1003                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1004                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1005                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1006                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1007                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1008                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1009                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1010                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1011                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1012                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1013                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1014                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1015                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1016                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1017                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1018                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1019                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1020                 </fields>
1021                 <links>
1022                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1023                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1024                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1025                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1026                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1027                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1028                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1029                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1030                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1031                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1032                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1033                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1034             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1035                 </links>
1036         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1037             <actions>
1038                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1039                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1040                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1041                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1042             </actions>
1043         </permacrud>
1044         </class>
1045
1046         <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">
1047                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1048                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1049                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1050                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1051                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1052                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link"/>
1053                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1054                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1055                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1056                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1057                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1058                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1059                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1060                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1061                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1062                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1063                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1064                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1065                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1066                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1067                 </fields>
1068                 <links>
1069                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1070                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1071                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1072                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1073                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1074                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1075                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1076                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1077                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1078                 </links>
1079         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1080             <actions>
1081                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1082                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1083                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1084                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1085             </actions>
1086         </permacrud>
1087         </class>
1088
1089         <class id="ccmcmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test" oils_persist:tablename="config.circ_matrix_circ_mod_test" reporter:label="Circulation Matrix Circulation Modifier Subtest">
1090                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1091                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1092                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1093                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1094                 </fields>
1095                 <links>
1096                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1097                 </links>
1098         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1099             <actions>
1100                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1101                     <context link="matchpoint" field="org_unit"/>
1102                 </create>
1103                 <retrieve/>
1104                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1105                     <context link="matchpoint" field="org_unit"/>
1106                 </update>
1107                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1108                     <context link="matchpoint" field="org_unit"/>
1109                 </delete>
1110             </actions>
1111         </permacrud>
1112         </class>
1113
1114         <class id="ccmcmtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test_map" oils_persist:tablename="config.circ_matrix_circ_mod_test_map" reporter:label="Circulation Matrix Circulation Modifier Subtest Circulation Modifier Set">
1115                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1116                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1117                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1118                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1119                 </fields>
1120                 <links>
1121                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1122                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1123                 </links>
1124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1125             <actions>
1126                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1127                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1128                 </create>
1129                 <retrieve/>
1130                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1131                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1132                 </update>
1133                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1134                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1135                 </delete>
1136             </actions>
1137         </permacrud>
1138         </class>
1139
1140         <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">
1141                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1142                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1143                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1144                 </fields>
1145                 <links/>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1149                 <retrieve/>
1150                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1151                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1152             </actions>
1153         </permacrud>
1154         </class>
1155
1156         <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">
1157                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1158                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1159                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1160                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1161                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1162                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1163                 </fields>
1164                 <links>
1165                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1166                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1167                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1168                 </links>
1169         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1170             <actions>
1171                 <create permission="ADMIN_SURVEY">
1172                     <context link="survey" field="owner"/>
1173                 </create>
1174                 <retrieve/>
1175                 <update permission="ADMIN_SURVEY">
1176                     <context link="survey" field="owner"/>
1177                 </update>
1178                 <delete permission="ADMIN_SURVEY">
1179                     <context link="survey" field="owner"/>
1180                 </delete>
1181             </actions>
1182         </permacrud>
1183         </class>
1184         <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">
1185                 <fields oils_persist:primary="id" oils_persist:sequence="">
1186                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1187                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1188                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1189                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1190                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1191                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1192                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1193                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1194                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1195                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1196                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1197                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1198                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1199                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1200                 </fields>
1201                 <links>
1202                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1203                 </links>
1204         </class>
1205         <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">
1206                 <fields oils_persist:primary="id" oils_persist:sequence="">
1207                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1208                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1209                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1210                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1211                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1212                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1213                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1214                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1215                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1216                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1217                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1218                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1219                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1220                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1221                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1222                 </fields>
1223                 <links>
1224                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1225                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1226                 </links>
1227         </class>
1228         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1229                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1230                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1231                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1232                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1233                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1234                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1235                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1236                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1237                 </fields>
1238                 <links>
1239                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1240                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1241                 </links>
1242         </class>
1243         <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">
1244                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1245                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1246                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1247                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1248                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1249                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1250                 </fields>
1251                 <links>
1252                         <link field="usr" reltype="has_a" key="id" class="au"/>
1253                 </links>
1254         </class>
1255         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1256                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1257                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1258                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1259                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1260                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1261                 </fields>
1262                 <links>
1263                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1264                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1265                 </links>
1266         </class>
1267         <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">
1268                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1269                         <field name="field" reporter:datatype="link"/>
1270                         <field name="id" reporter:datatype="id" />
1271                         <field name="source" reporter:datatype="link"/>
1272                         <field name="value" reporter:datatype="text"/>
1273                 </fields>
1274                 <links>
1275                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1276                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1277                 </links>
1278         </class>
1279         <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">
1280                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1281                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1282                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1283                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1284                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1285                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1286                 </fields>
1287                 <links>
1288                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1289                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1290                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1291                 </links>
1292         </class>
1293         <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">
1294                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1295                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1296                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1297                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1298                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1299                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1300                 </fields>
1301                 <links>
1302                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1303                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1304                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1305                 </links>
1306         </class>
1307         <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">
1308                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1309                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1310                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1311                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1312                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1313                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1314                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1315                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1316                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1317                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1318                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1319                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1320                 </fields>
1321                 <links>
1322                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1323                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1324                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1325                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1326                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1327                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1328                 </links>
1329         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1330             <actions>
1331                 <create permission="TRANSIT_COPY" context_field="owner">
1332                     <context link="target_copy" field="circ_lib"/>
1333                 </create>
1334                 <retrieve/>
1335                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1336                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1337             </actions>
1338         </permacrud>
1339         </class>
1340         <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">
1341                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1342                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1343                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1344                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1345                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1346                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1347                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1348                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1349                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1350                 </fields>
1351                 <links>
1352                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1353                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1354                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1355                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1356                 </links>
1357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1358             <actions>
1359                 <create permission="ADMIN_SURVEY">
1360                     <context link="survey" field="owner"/>
1361                 </create>
1362                 <retrieve/>
1363                 <update permission="ADMIN_SURVEY">
1364                     <context link="survey" field="owner"/>
1365                 </update>
1366                 <delete permission="ADMIN_SURVEY">
1367                     <context link="survey" field="owner"/>
1368                 </delete>
1369             </actions>
1370         </permacrud>
1371         </class>
1372         <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">
1373                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1374                         <field name="bucket" />
1375                         <field name="id" reporter:datatype="id" />
1376                         <field name="target_copy" reporter:datatype="link"/>
1377                         <field name="create_time" reporter:datatype="timestamp" />
1378                         <field name="pos" reporter:datatype="int" />
1379                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1380                 </fields>
1381                 <links>
1382                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1383                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1384             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1385                 </links>
1386         </class>
1387         <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">
1388                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1389                         <field name="id" reporter:datatype="id" />
1390                         <field name="item" reporter:datatype="link"/>
1391                         <field name="note" reporter:datatype="text" />
1392                 </fields>
1393                 <links>
1394                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1395                 </links>
1396         </class>
1397         <class id="are" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1398                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1399                         <field name="active" reporter:datatype="bool"/>
1400                         <field name="arn_source" />
1401                         <field name="arn_value" />
1402                         <field name="create_date" reporter:datatype="timestamp"/>
1403                         <field name="creator" />
1404                         <field name="deleted" reporter:datatype="bool"/>
1405                         <field name="edit_date" reporter:datatype="timestamp"/>
1406                         <field name="editor" />
1407                         <field name="id" reporter:datatype="id" />
1408                         <field name="last_xact_id" />
1409                         <field name="marc" />
1410                         <field name="source" />
1411                         <field name="fixed_fields" oils_persist:virtual="true" />
1412                         <field name="notes" oils_persist:virtual="true" />
1413                 </fields>
1414                 <links>
1415                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1416                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1417                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1418                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1419                 </links>
1420         </class>
1421         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1422                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1423                         <field name="char_encoding" />
1424                         <field name="id" />
1425                         <field name="record" />
1426                         <field name="record_status" />
1427                 </fields>
1428                 <links>
1429                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1430                 </links>
1431         </class>
1432         <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">
1433                 <fields oils_persist:primary="code" oils_persist:sequence="">
1434                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1435                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1436                 </fields>
1437                 <links/>
1438         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1439             <actions>
1440                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1441                 <retrieve/>
1442                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1443                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1444             </actions>
1445         </permacrud>
1446         </class>
1447         <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">
1448                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1449                         <field name="accepting_usr" />
1450                         <field name="amount" reporter:datatype="money" />
1451                         <field name="amount_collected" reporter:datatype="money" />
1452                         <field name="approval_code" reporter:datatype="text"/>
1453                         <field name="cash_drawer" reporter:datatype="link"/>
1454                         <field name="cc_number" reporter:datatype="text"/>
1455                         <field name="cc_type" reporter:datatype="text"/>
1456                         <field name="cc_processor" reporter:datatype="text"/>
1457                         <field name="expire_month" reporter:datatype="int" />
1458                         <field name="expire_year" reporter:datatype="int" />
1459                         <field name="id" reporter:datatype="id" />
1460                         <field name="note" reporter:datatype="text"/>
1461                         <field name="payment_ts" reporter:datatype="timestamp"/>
1462                         <field name="xact" reporter:datatype="link"/>
1463                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1464                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1465                 </fields>
1466                 <links>
1467                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1468                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1469                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1470                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1471                 </links>
1472         </class>
1473         <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">
1474                 <fields oils_persist:primary="name">
1475                         <field reporter:label="Field Class" name="field_class" />
1476                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1477                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1478                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1479                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1480                 </fields>
1481                 <links/>
1482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1483             <actions>
1484                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1485                 <retrieve/>
1486                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1487                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1488             </actions>
1489         </permacrud>
1490         </class>
1491
1492         <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">
1493                 <fields oils_persist:primary="alias">
1494                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1495                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1496                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1497                 </fields>
1498                 <links>
1499                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1500                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1501                 </links>
1502         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1503             <actions>
1504                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1505                 <retrieve/>
1506                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1507                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1508             </actions>
1509         </permacrud>
1510         </class>
1511
1512         <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">
1513                 <fields oils_persist:primary="name">
1514                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1515                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1516                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1517                 </fields>
1518                 <links>
1519                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1520                 </links>
1521         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1522             <actions>
1523                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1524                 <retrieve/>
1525                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1526                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1527             </actions>
1528         </permacrud>
1529         </class>
1530
1531         <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">
1532                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1533                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1534                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1535                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1536                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1537                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1538                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1539                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1540                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1541                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1542                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1543                 </fields>
1544                 <links>
1545                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1546                 </links>
1547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1548             <actions>
1549                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1550                 <retrieve/>
1551                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1552                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1553             </actions>
1554         </permacrud>
1555         </class>
1556         <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">
1557                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1558                         <field name="id" reporter:datatype="id" />
1559                         <field name="name" reporter:datatype="text"/>
1560                         <field name="xpath" reporter:datatype="text"/>
1561                         <field name="format" reporter:datatype="link"/>
1562                         <field name="first_word" reporter:datatype="bool" />
1563                 </fields>
1564                 <links/>
1565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1566             <actions>
1567                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1568                 <retrieve/>
1569                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1570                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1571             </actions>
1572         </permacrud>
1573         </class>
1574         <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">
1575                 <fields oils_persist:primary="code" oils_persist:sequence="">
1576                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1577                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1578                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1579                 </fields>
1580                 <links/>
1581         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1582             <actions>
1583                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1584                 <retrieve/>
1585                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1586                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1587             </actions>
1588         </permacrud>
1589         </class>
1590         <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">
1591                 <fields oils_persist:primary="code" oils_persist:sequence="">
1592                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1593                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1594                 </fields>
1595                 <links/>
1596         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1597             <actions>
1598                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1599                 <retrieve/>
1600                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1601                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1602             </actions>
1603         </permacrud>
1604         </class>
1605         <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">
1606                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1607                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1608                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1609                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1610                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1611                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1612                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1613                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1614                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1615                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1616                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1617                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1618                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1619                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1620                 </fields>
1621                 <links>
1622                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1623                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1624                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1625                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1626                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1627                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1628                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1629                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1630                 </links>
1631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1632             <actions>
1633                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1634                 <retrieve/>
1635                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1636                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1637             </actions>
1638         </permacrud>
1639         </class>
1640         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1641                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1642                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1643                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1644                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1645                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1646                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1647                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1648                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1649                 </fields>
1650                 <links>
1651                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1652                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1653         </links>
1654         </class>
1655         <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">
1656                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1657                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1658                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1659                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1660                 </fields>
1661                 <links>
1662                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1663                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1664                 </links>
1665         </class>
1666         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1667                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1668                         <field name="id" reporter:datatype="id" />
1669                         <field name="value" oils_persist:i18n="true" />
1670                 </fields>
1671                 <links/>
1672         </class>
1673         <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">
1674                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1675                         <field name="balance_owed" reporter:datatype="money" />
1676                         <field name="total_owed" reporter:datatype="money" />
1677                         <field name="total_paid" reporter:datatype="money" />
1678                         <field name="usr" reporter:datatype="link"/>
1679                 </fields>
1680                 <links>
1681                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1682         </links>
1683         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1684             <actions>
1685                 <retrieve permission="VIEW_USER">
1686                     <context link="usr" field="home_ou"/>
1687                 </retrieve>
1688             </actions>
1689         </permacrud>
1690         </class>
1691         <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">
1692                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1693                         <field name="collector" />
1694                         <field name="enter_time" reporter:datatype="timestamp"/>
1695                         <field name="id" reporter:datatype="id" />
1696                         <field name="location" reporter:datatype="link"/>
1697                         <field name="usr" reporter:datatype="link"/>
1698                 </fields>
1699                 <links>
1700                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1701                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1702                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1703                 </links>
1704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1705             <actions>
1706                 <create permission="money.collections_tracker.create" context_field="location"/>
1707                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1708                 <delete permission="money.collections_tracker.create" context_field="location"/>
1709             </actions>
1710         </permacrud>
1711         </class>
1712         <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">
1713                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1714                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1715                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1716                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1717                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1718                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1719                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1720                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1721                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1722                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1723                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1724                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1725                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1726                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1727                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1728                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1729                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1730                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1731                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
1732                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1733                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1734                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1735                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1736                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1737                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1738                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1739                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1740                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1741                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1742                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1743                 </fields>
1744                 <links>
1745                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1746                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1747                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1748                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1749                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1750                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1751                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1752                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1753                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1754                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1755                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1756                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
1757                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1758                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1759                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1760                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1761                 </links>
1762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1763             <actions>
1764                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1765                 <retrieve/>
1766                 <update permission="UPDATE_MARC" global_required="true"/>
1767             </actions>
1768         </permacrud>
1769         </class>
1770         <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">
1771                 <fields oils_persist:primary="id">
1772                         <field name="dow_0_close" />
1773                         <field name="dow_0_open" />
1774                         <field name="dow_1_close" />
1775                         <field name="dow_1_open" />
1776                         <field name="dow_2_close" />
1777                         <field name="dow_2_open" />
1778                         <field name="dow_3_close" />
1779                         <field name="dow_3_open" />
1780                         <field name="dow_4_close" />
1781                         <field name="dow_4_open" />
1782                         <field name="dow_5_close" />
1783                         <field name="dow_5_open" />
1784                         <field name="dow_6_close" />
1785                         <field name="dow_6_open" />
1786                         <field name="id" reporter:datatype="id" />
1787                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1788                 </fields>
1789                 <links>
1790                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
1791                 </links>
1792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1793             <actions>
1794                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
1795                 <retrieve/>
1796                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
1797                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
1798             </actions>
1799         </permacrud>
1800         </class>
1801         <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">
1802                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1803                         <field name="close_end" reporter:datatype="timestamp" />
1804                         <field name="close_start" reporter:datatype="timestamp" />
1805                         <field name="id" reporter:datatype="id" />
1806                         <field name="org_unit" reporter:datatype="org_unit"/>
1807                         <field name="reason" reporter:datatype="text"/>
1808                 </fields>
1809                 <links>
1810                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1811                 </links>
1812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1813             <actions>
1814                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1815                 <retrieve/>
1816                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1817                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1818             </actions>
1819         </permacrud>
1820         </class>
1821         <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">
1822                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1823                         <field name="extended" reporter:datatype="interval"/>
1824                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1825                         <field name="max_renewals" reporter:datatype="int" />
1826                         <field name="name" reporter:datatype="text"/>
1827                         <field name="normal" reporter:datatype="interval"/>
1828                         <field name="shrt" reporter:datatype="interval"/>
1829                 </fields>
1830                 <links>
1831                 </links>
1832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1833             <actions>
1834                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1835                 <retrieve/>
1836                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1837                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1838             </actions>
1839         </permacrud>
1840         </class>
1841         <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">
1842                 <fields oils_persist:primary="id" oils_persist:sequence="">
1843                         <field name="balance_owed" reporter:datatype="money"/>
1844                         <field name="id" reporter:datatype="id" />
1845                         <field name="last_billing_note" reporter:datatype="text"/>
1846                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1847                         <field name="last_billing_type" reporter:datatype="text"/>
1848                         <field name="last_payment_note" reporter:datatype="text"/>
1849                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1850                         <field name="last_payment_type" reporter:datatype="text"/>
1851                         <field name="total_owed" reporter:datatype="money"/>
1852                         <field name="total_paid" reporter:datatype="money"/>
1853                         <field name="usr" reporter:datatype="link"/>
1854                         <field name="xact_finish" reporter:datatype="timestamp" />
1855                         <field name="xact_start" reporter:datatype="timestamp" />
1856                         <field name="xact_type" reporter:datatype="text"/>
1857                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1858                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1859                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1860                         <field name="billing_location" reporter:datatype="link"/>
1861                 </fields>
1862                 <links>
1863                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1864                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1865                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1866                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1867                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1868                 </links>
1869         </class>
1870         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1871                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1872                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1873                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1874                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1875                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1876                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1877                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1878                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1879                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1880                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1881                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1882                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1883                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1884                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1885                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1886                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1887                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1888                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1889                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
1890                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1891                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1892                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1893                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1894                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1895                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1896                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1897                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1898                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1899                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1900                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1901                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1902                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1903                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1904                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
1905                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
1906                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
1907                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
1908                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
1909                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
1910                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
1911                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
1912                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
1913                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
1914                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
1915                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
1916                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
1917                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
1918                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
1919                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
1920                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
1921                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
1922                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
1923                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1924                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1925                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
1926                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
1927                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1928                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1929                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
1930                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1931                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
1932                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
1933                 </fields>
1934                 <links>
1935                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
1936                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
1937                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
1938                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
1939                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
1940                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
1941                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
1942                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
1943                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
1944                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
1945                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
1946                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
1947                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
1948                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
1949                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
1950                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
1951                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
1952                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
1953                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
1954                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
1955                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
1956                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
1957                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
1958                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
1959                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
1960                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
1961                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
1962                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
1963                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
1964                 </links>
1965         </class>
1966
1967         <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">
1968                 <fields oils_persist:primary="name">
1969                         <field name="name" reporter:datatype="text"/>
1970                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1971                 </fields>
1972                 <links/>
1973                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1974                         <actions>
1975                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
1976                                 <retrieve/>
1977                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
1978                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
1979                         </actions>
1980                 </permacrud>
1981         </class>
1982         <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">
1983                 <fields oils_persist:primary="name">
1984                         <field name="name" reporter:datatype="text"/>
1985                         <field name="label" reporter:datatype="text"/>
1986                         <field name="description" reporter:datatype="text"/>
1987                         <field name="datatype" reporter:datatype="text"/>
1988                         <field name="fm_class" reporter:datatype="text"/>
1989                         <field name="grp" reporter:datatype="link"/>
1990                 </fields>
1991                 <links>
1992                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
1993                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
1994                 </links>
1995                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1996                         <actions>
1997                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1998                                 <retrieve/>
1999                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2000                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2001                         </actions>
2002                 </permacrud>
2003         </class>
2004         <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">
2005                 <fields oils_persist:primary="name">
2006                         <field name="name" reporter:datatype="text"/>
2007                         <field name="label" reporter:datatype="text"/>
2008                         <field name="description" reporter:datatype="text"/>
2009                         <field name="datatype" reporter:datatype="text"/>
2010                         <field name="view_perm" reporter:datatype="link"/>
2011                         <field name="update_perm" reporter:datatype="link"/>
2012                         <field name="fm_class" reporter:datatype="text"/>
2013                         <field name="grp" reporter:datatype="link"/>
2014                 </fields>
2015                 <links>
2016                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2017                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2018                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2019                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2020                 </links>
2021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2022                         <actions>
2023                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2024                                 <retrieve/>
2025                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2026                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2027                         </actions>
2028                 </permacrud>
2029         </class>
2030         <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">
2031                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2032                         <field name="id" />
2033                         <field name="name"  reporter:datatype="text"/>
2034                         <field name="org_unit" reporter:datatype="org_unit"/>
2035                         <field name="value"  reporter:datatype="text"/>
2036                 </fields>
2037                 <links>
2038                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2039                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2040                 </links>
2041         </class>
2042         <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">
2043                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2044                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2045                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2046                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2047                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2048                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2049                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2050                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2051                 </fields>
2052                 <links>
2053                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2054                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2055                 </links>
2056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2057             <actions>
2058                 <create permission="CREATE_COPY_NOTE">
2059                     <context link="owning_copy" field="circ_lib"/>
2060                 </create>
2061                 <retrieve permission="VIEW_COPY_NOTES">
2062                     <context link="owning_copy" field="circ_lib"/>
2063                 </retrieve>
2064                 <update permission="UPDATE_COPY_NOTE">
2065                     <context link="owning_copy" field="circ_lib"/>
2066                 </update>
2067                 <delete permission="DELETE_COPY_NOTE">
2068                     <context link="owning_copy" field="circ_lib"/>
2069                 </delete>
2070             </actions>
2071         </permacrud>
2072         </class>
2073         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2074                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2075                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2076                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2077                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2078                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2079                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2080                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2081                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2082                 </fields>
2083                 <links>
2084                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2085                 </links>
2086         </class>
2087         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2088                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2089                         <field name="fingerprint"  reporter:datatype="text"/>
2090                         <field name="id" reporter:datatype="id" />
2091                         <field name="master_record" reporter:datatype="link"/>
2092                         <field name="mods"  reporter:datatype="text"/>
2093                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2094                 </fields>
2095                 <links>
2096                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2097                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2098                 </links>
2099         </class>
2100         <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">
2101                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2102                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2103                         <field name="name"  reporter:datatype="text"/>
2104                 </fields>
2105                 <links/>
2106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2107             <actions>
2108                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2109                 <retrieve/>
2110                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2111                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2112             </actions>
2113         </permacrud>
2114         </class>
2115         <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">
2116                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2117                         <field name="code"  reporter:datatype="text"/>
2118                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2119                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2120                 </fields>
2121                 <links/>
2122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2123             <actions>
2124                 <create permission="CREATE_PERM" global_required="true"/>
2125                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2126                 <update permission="UPDATE_PERM" global_required="true"/>
2127                 <delete permission="DELETE_PERM" global_required="true"/>
2128             </actions>
2129         </permacrud>
2130         </class>
2131         <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">
2132                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2133                         <field name="id" reporter:datatype="id" />
2134                         <field name="metarecord" reporter:datatype="link"/>
2135                         <field name="source" reporter:datatype="link"/>
2136                 </fields>
2137                 <links>
2138                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2139                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2140                 </links>
2141         </class>
2142         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" reporter:label="Combined Facet Entry View" oils_persist:readonly="true">
2143                 <oils_persist:source_definition>
2144                         SELECT * FROM (
2145                                 SELECT * FROM metabib.author_field_entry
2146                                                 UNION ALL
2147                                 SELECT * FROM metabib.keyword_field_entry
2148                                                 UNION ALL
2149                                 SELECT * FROM metabib.identifier_field_entry
2150                                                 UNION ALL
2151                                 SELECT * FROM metabib.title_field_entry
2152                                                 UNION ALL
2153                                 SELECT * FROM metabib.subject_field_entry
2154                                                 UNION ALL
2155                                 SELECT * FROM metabib.series_field_entry
2156                         )x
2157                         WHERE x.index_vector = ''
2158                 </oils_persist:source_definition>
2159                 <fields>
2160                         <field name="field" reporter:datatype="link"/>
2161                         <field name="id" reporter:datatype="id" />
2162                         <field name="source" reporter:datatype="link"/>
2163                         <field name="value"  reporter:datatype="text"/>
2164                 </fields>
2165                 <links>
2166                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2167                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2168                 </links>
2169         </class>
2170         <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">
2171                 <oils_persist:source_definition>
2172                         SELECT * FROM metabib.author_field_entry
2173                                                 UNION ALL
2174                         SELECT * FROM metabib.keyword_field_entry
2175                                                 UNION ALL
2176                         SELECT * FROM metabib.identifier_field_entry
2177                                                 UNION ALL
2178                         SELECT * FROM metabib.title_field_entry
2179                                                 UNION ALL
2180                         SELECT * FROM metabib.subject_field_entry
2181                                                 UNION ALL
2182                         SELECT * FROM metabib.series_field_entry
2183                 </oils_persist:source_definition>
2184                 <fields>
2185                         <field name="field" reporter:datatype="link"/>
2186                         <field name="id" reporter:datatype="id" />
2187                         <field name="source" reporter:datatype="link"/>
2188                         <field name="value"  reporter:datatype="text"/>
2189                 </fields>
2190                 <links>
2191                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2192                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2193                 </links>
2194         </class>
2195         <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">
2196                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2197                         <field name="field" reporter:datatype="link"/>
2198                         <field name="id" reporter:datatype="id" />
2199                         <field name="source" reporter:datatype="link"/>
2200                         <field name="value"  reporter:datatype="text"/>
2201                 </fields>
2202                 <links>
2203                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2204                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2205                 </links>
2206         </class>
2207         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2208                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2209                         <field name="accepting_usr" reporter:datatype="link"/>
2210                         <field name="amount" reporter:datatype="money" />
2211                         <field name="amount_collected" reporter:datatype="money" />
2212                         <field name="cash_drawer" reporter:datatype="link"/>
2213                         <field name="id" reporter:datatype="id" />
2214                         <field name="note"  reporter:datatype="text"/>
2215                         <field name="payment_ts" reporter:datatype="timestamp"/>
2216                         <field name="xact" reporter:datatype="link"/>
2217                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2218                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2219                 </fields>
2220                 <links>
2221                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2222                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2223                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2224                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2225                 </links>
2226         </class>
2227         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2228                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2229                         <field name="accepting_usr" reporter:datatype="link"/>
2230                         <field name="amount" reporter:datatype="money" />
2231                         <field name="amount_collected" reporter:datatype="money" />
2232                         <field name="id" reporter:datatype="id" />
2233                         <field name="note"  reporter:datatype="text"/>
2234                         <field name="payment_ts" reporter:datatype="timestamp"/>
2235                         <field name="xact" reporter:datatype="link"/>
2236                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2237                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2238                 </fields>
2239                 <links>
2240                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2241                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2242                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2243                 </links>
2244         </class>
2245         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2246                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2247                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2248                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2249                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2250                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2251                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2252                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2253                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2254                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2255                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2256                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2257                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2258                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2259                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2260                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2261                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2262                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2263                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2264                 </fields>
2265                 <links>
2266                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2267                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2268                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2269                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2270                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2271                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2272                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2273                 </links>
2274         </class>
2275
2276         <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">
2277                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2278                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2279                         <field name="name"  reporter:datatype="text"/>
2280                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2281                         <field name="block_list" reporter:datatype="text"/>
2282                         <field name="org_depth" reporter:datatype="int"/>
2283                 </fields>
2284                 <links/>
2285         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2286             <actions>
2287                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2288                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2289                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2290                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2291             </actions>
2292         </permacrud>
2293         </class>
2294         <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">
2295                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2296                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2297                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2298                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2299                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2300                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2301                 </fields>
2302                 <links>
2303                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2304                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2305                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2306         </links>
2307         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2308             <actions>
2309                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2310                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2311                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2312                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2313             </actions>
2314         </permacrud>
2315         </class>
2316         <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">
2317                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2318                         <field name="holdable" reporter:datatype="bool"/>
2319                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2320                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2321                         <field name="opac_visible" reporter:datatype="bool"/>
2322                 </fields>
2323                 <links/>
2324         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2325             <actions>
2326                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2327                 <retrieve/>
2328                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2329                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2330             </actions>
2331         </permacrud>
2332         </class>
2333         <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">
2334                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2335                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2336                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2337                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2338                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2339                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2340                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2341                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2342                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2343                 </fields>
2344                 <links>
2345                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2346                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2347                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2348                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2349                 </links>
2350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2351                         <actions>
2352                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2353                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2354                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2355                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2356                         </actions>
2357                 </permacrud>
2358         </class>
2359         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2360                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2361                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2362                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2363                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2364                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2365                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2366                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2367                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2368                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2369                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2370                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2371                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2372                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2373                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2374                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2375                 </fields>
2376                 <links>
2377                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2378                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2379                 </links>
2380         </class>
2381         <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">
2382                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2383                         <field name="call_number" />
2384                         <field name="create_date" reporter:datatype="timestamp"/>
2385                         <field name="creator" reporter:datatype="link"/>
2386                         <field name="id" reporter:datatype="id" />
2387                         <field name="pub" reporter:datatype="bool"/>
2388                         <field name="title"  reporter:datatype="text"/>
2389                         <field name="value"  reporter:datatype="text"/>
2390                 </fields>
2391                 <links>
2392                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2393                 </links>
2394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2395             <actions>
2396                 <create permission="CREATE_VOLUME_NOTE">
2397                     <context link="call_number" field="owning_lib"/>
2398                 </create>
2399                 <retrieve permission="VIEW_VOLUME_NOTES">
2400                     <context link="call_number" field="owning_lib"/>
2401                 </retrieve>
2402                 <update permission="UPDATE_VOLUME_NOTE">
2403                     <context link="call_number" field="owning_lib"/>
2404                 </update>
2405                 <delete permission="DELETE_VOLUME_NOTE">
2406                     <context link="call_number" field="owning_lib"/>
2407                 </delete>
2408             </actions>
2409         </permacrud>
2410         </class>
2411         <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">
2412                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2413                         <field name="create_date" reporter:datatype="timestamp"/>
2414                         <field name="creator" reporter:datatype="link"/>
2415                         <field name="edit_date" reporter:datatype="timestamp"/>
2416                         <field name="editor" reporter:datatype="link"/>
2417                         <field name="id" reporter:datatype="id" />
2418                         <field name="record" reporter:datatype="link"/>
2419                         <field name="value" reporter:datatype="text"/>
2420                 </fields>
2421                 <links>
2422                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2423                 </links>
2424         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2425             <actions>
2426                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2427                 <retrieve/>
2428                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2429                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2430             </actions>
2431         </permacrud>
2432         </class>
2433         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2434                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2435                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2436                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2437                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2438                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2439                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2440                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2441                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2442                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2443                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2444                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2445                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2446                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2447                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2448                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2449                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2450                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2451                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2452                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2453                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2454                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2455                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2456                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2457                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2458                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2459                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2460                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2461                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2462                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2463                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2464                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2465                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2466                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2467                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2468                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2469                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2470                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2471                 </fields>
2472                 <links>
2473                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2474                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2475                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2476                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2477                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2478                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2479                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2480                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2481                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2482                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2483                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2484                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2485                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2486                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2487                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2488                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2489                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2490                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2491                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2492                 </links>
2493         </class>
2494         <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">
2495                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2496                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2497                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2498                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2499                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2500                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2501                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2502                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2503                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2504                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2505                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2506                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2507                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2508                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2509                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2510                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2511                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2512                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2513                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2514                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2515                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2516                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2517                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2518                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2519                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2520                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2521                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2522                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2523                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2524                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2525                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2526                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2527                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2528                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2529                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2530                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2531                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2532                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2533                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2534                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2535                 </fields>
2536                 <links>
2537                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2538                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2539                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2540                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2541                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2542                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2543                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2544                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2545                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2546                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2547                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2548                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2549                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2550                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2551                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2552                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2553                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2554                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2555                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2556                 </links>
2557         </class>
2558         <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">
2559                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2560                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2561                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2562                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2563                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2564                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2565                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2566                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2567                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2568                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2569                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2570                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2571                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2572                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2573                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2574                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2575                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2576                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2577                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2578                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2579                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2580                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2581                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2582                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2583                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2584                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2585                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2586                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2587                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2588                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2589                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2590                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2591                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2592                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2593                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2594                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2595                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2596                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2597                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2598                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2599                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2600                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2601                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2602                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2603                 </fields>
2604                 <links>
2605                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2606                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2607                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2608                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2609                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2610                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2611                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2612                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2613                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2614                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2615                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2616                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2617                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2618                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2619                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2620                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2621                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2622                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2623                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2624                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2625                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2626                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2627                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2628                 </links>
2629         </class>
2630
2631         <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">
2632                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2633                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id"/>
2634                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2635                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2636                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2637                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2638                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2639                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2640                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2641                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2642                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
2643                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2644                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2645                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
2646                 </fields>
2647                 <links>
2648                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2649                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2650                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
2651                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
2652                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
2653                 </links>
2654                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2655                         <actions>
2656                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2657                                 <retrieve />
2658                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2659                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2660                         </actions>
2661                 </permacrud>
2662         </class>
2663
2664         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
2665                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
2666                         <field reporter:label="Resource ID" name="id" reporter:datatype="id"/>
2667                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2668                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
2669                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
2670                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2671                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
2672                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
2673                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
2674                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2675                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2676                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2677                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
2678                 </fields>
2679                 <links>
2680                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2681                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
2682                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
2683                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
2684                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
2685                 </links>
2686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2687                         <actions>
2688                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2689                                 <retrieve />
2690                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2691                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2692                         </actions>
2693                 </permacrud>
2694         </class>
2695         
2696         <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">
2697                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
2698                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id"/>
2699                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2700                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
2701                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
2702                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
2703                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
2704                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2705                 </fields>
2706                 <links>
2707                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2708                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
2709                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
2710                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
2711                 </links>
2712                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2713                         <actions>
2714                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2715                                 <retrieve />
2716                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2717                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2718                         </actions>
2719                 </permacrud>
2720         </class>
2721         
2722         <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">
2723                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
2724                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id"/>
2725                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2726                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
2727                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
2728                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2729                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2730                 </fields>
2731                 <links>
2732                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2733                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
2734                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
2735                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
2736                 </links>
2737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2738                         <actions>
2739                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2740                                 <retrieve />
2741                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2742                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2743                         </actions>
2744                 </permacrud>
2745         </class>
2746         
2747         <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">
2748                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
2749                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
2750                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
2751                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
2752                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
2753                 </fields>
2754                 <links>
2755                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
2756                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
2757                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
2758                 </links>
2759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2760                         <actions>
2761                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2762                                 <retrieve />
2763                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2764                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2765                         </actions>
2766                 </permacrud>
2767         </class>
2768         
2769         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
2770                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2771                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2772                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2773                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
2774                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
2775                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2776                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2777                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2778                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2779                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2780                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
2781                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2782                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
2783                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
2784                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
2785                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
2786                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
2787                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
2788                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
2789                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2790                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2791                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2792                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
2793                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
2794                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
2795                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
2796                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
2797                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
2798                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2799                 </fields>
2800                 <links>
2801                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2802                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2803                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2804                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2805                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2806                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2807                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
2808                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2809                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2810                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2811                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
2812                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
2813                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
2814                 </links>
2815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2816                         <actions>
2817                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2818                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
2819                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2820                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2821                         </actions>
2822                 </permacrud>
2823         </class>
2824         
2825         <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">
2826                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
2827                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
2828                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
2829                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
2830                 </fields>
2831                 <links>
2832                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
2833                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
2834                 </links>
2835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2836                         <actions>
2837                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2838                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
2839                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2840                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2841                         </actions>
2842                 </permacrud>
2843         </class>
2844
2845         <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">
2846                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2847                         <field name="bucket" reporter:datatype="link"/>
2848                         <field name="id" reporter:datatype="id" />
2849                         <field name="target_call_number" reporter:datatype="link" />
2850                         <field name="create_time" reporter:datatype="timestamp" />
2851                         <field name="pos" reporter:datatype="int" />
2852                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2853                 </fields>
2854                 <links>
2855                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2856                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2857             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2858                 </links>
2859         </class>
2860         <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">
2861                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2862                         <field name="id" reporter:datatype="id" />
2863                         <field name="item" reporter:datatype="link"/>
2864                         <field name="note" reporter:datatype="text" />
2865                 </fields>
2866                 <links>
2867                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2868                 </links>
2869         </class>
2870         <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">
2871                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2872                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2873                         <field name="btype" reporter:datatype="text"/>
2874                         <field name="id" reporter:datatype="id" />
2875                         <field name="name" reporter:datatype="text"/>
2876                         <field name="owner" reporter:datatype="link"/>
2877                         <field name="pub" reporter:datatype="bool"/>
2878                         <field name="create_time" reporter:datatype="timestamp" />
2879                 </fields>
2880                 <links>
2881                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2882                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2883                 </links>
2884         </class>
2885         <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">
2886                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2887                         <field name="id" reporter:datatype="id" />
2888                         <field name="bucket" reporter:datatype="link"/>
2889                         <field name="note" reporter:datatype="text" />
2890                 </fields>
2891                 <links>
2892                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2893                 </links>
2894         </class>
2895         <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">
2896                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2897                         <field name="hold" reporter:datatype="link"/>
2898                         <field name="id" reporter:datatype="id" />
2899                         <field name="target_copy" reporter:datatype="link"/>
2900                 </fields>
2901                 <links>
2902                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2903                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2904                 </links>
2905         </class>
2906         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2907                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2908                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2909                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2910                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2911                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2912                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2913                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2914                 </fields>
2915                 <links>
2916                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2917                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2918                 </links>
2919         </class>
2920         <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">
2921                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2922                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2923                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2924                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2925                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2926                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2927                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2928                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2929                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
2930                 </fields>
2931                 <links>
2932                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2933                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2934                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
2935                 </links>
2936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2937             <actions>
2938                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2939                 <retrieve/>
2940                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2941                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2942             </actions>
2943         </permacrud>
2944         </class>
2945
2946     <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">
2947         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
2948             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
2949             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
2950             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
2951             <field reporter:label="Position" name="position" reporter:datatype="int"/>
2952         </fields>
2953         <links>
2954             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
2955             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
2956         </links>
2957         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2958             <actions>
2959                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2960                 <retrieve/>
2961                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2962                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2963             </actions>
2964         </permacrud>
2965     </class>
2966
2967         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2968                 <fields>
2969                         <field name="id" oils_persist:virtual="true" />
2970                         <field name="location" oils_persist:virtual="true" />
2971                         <field name="owning_lib" oils_persist:virtual="true" />
2972                         <field name="holdings" oils_persist:virtual="true" />
2973                         <field name="current_holdings" oils_persist:virtual="true" />
2974                         <field name="supplements" oils_persist:virtual="true" />
2975                         <field name="current_supplements" oils_persist:virtual="true" />
2976                         <field name="indexes" oils_persist:virtual="true" />
2977                         <field name="current_indexes" oils_persist:virtual="true" />
2978                         <field name="online" oils_persist:virtual="true" />
2979                         <field name="missing" oils_persist:virtual="true" />
2980                         <field name="incomplete" oils_persist:virtual="true" />
2981                 </fields>
2982         </class>
2983         <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">
2984                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
2985                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2986                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2987                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2988                         <field reporter:label="Creator" name="creator" />
2989                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2990                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
2991                         <field reporter:label="Editor" name="editor" />
2992                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2993                         <field reporter:label="Last Transaction ID" name="last_xact_id" />
2994                         <field reporter:label="MARC" name="marc" />
2995                         <field reporter:label="Source" name="source" />
2996                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
2997                 </fields>
2998                 <links>
2999                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3000                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3001                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3002                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3003                 </links>
3004                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3005                         <actions>
3006                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3007                                 <retrieve/>
3008                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3009                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3010                         </actions>
3011                 </permacrud>
3012         </class>
3013
3014         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3015                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3016                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
3017                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3018                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3019                         <field reporter:label="Record Entry" name="record_entry" reporter:datatype="link"/>
3020                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3021                 </fields>
3022                 <links>
3023                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3024                 </links>
3025         </class>
3026
3027         <class id="sd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3028                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3029                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3030                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3031                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="link"/>
3032                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3033                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3034                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3035                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3036                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3037                         <field reporter:label="Unit Label Base" name="unit_label_base" reporter:datatype="text"/>
3038                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3039                 </fields>
3040                 <links>
3041                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3042                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3043                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3044                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3045                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3046                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3047                 </links>
3048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3049                 </permacrud>
3050         </class>
3051
3052         <class id="ss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3053                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3054                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3055                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3056                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3057                 </fields>
3058                 <links>
3059                         <link field="distribution" reltype="has_a" key="id" map="" class="sd"/>
3060                 </links>
3061                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3062                 </permacrud>
3063         </class>
3064
3065         <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">
3066                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3067                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3068                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3069                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3070                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3071                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3072                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3073                 </fields>
3074                 <links>
3075                         <link field="stream" reltype="has_a" key="id" map="" class="ss"/>
3076                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3077                 </links>
3078                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3079                 </permacrud>
3080         </class>
3081
3082         <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3083                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3084                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3085                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3086                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3087                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3088                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3089                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3090                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3091                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3092                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3093                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3094                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3095                 </fields>
3096                 <links>
3097                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3098                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3099                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3100                 </links>
3101         </class>
3102
3103         <class id="su" controller="open-ils.cstore" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3104                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3105                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3106             <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3107             <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3108             <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3109             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3110             <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3111             <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3112             <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3113             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3114             <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3115             <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3116             <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3117             <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3118             <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3119             <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3120             <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3121             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3122             <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3123             <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3124             <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3125             <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3126             <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3127             <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3128             <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3129             <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3130             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3131             <field reporter:label="Price" name="price" reporter:datatype="money" />
3132             <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3133             <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3134             <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3135             <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3136             <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3137             <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3138             <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3139             <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3140             <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3141             <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3142                         <field reporter:label="Label Sort Key" name="label_sort_key" reporter:datatype="text"/>
3143                         <field reporter:label="Contents" name="contents" reporter:datatype="text"/>
3144                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3145                 </fields>
3146                 <links>
3147             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3148             <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3149             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3150             <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3151             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3152             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3153             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3154             <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3155             <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3156             <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3157             <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3158             <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3159             <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3160             <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3161                 </links>
3162                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3163                 </permacrud>
3164         </class>
3165
3166         <class id="si" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3167                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3168                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3169                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3170                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3171                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3172                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3173                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3174                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3175                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3176                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3177                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3178                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3179                 </fields>
3180                 <links>
3181                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3182                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3183                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3184                         <link field="stream" reltype="has_a" key="id" map="" class="ss"/>
3185                         <link field="unit" reltype="has_a" key="id" map="" class="su"/>
3186                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3187                 </links>
3188                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3189                 </permacrud>
3190         </class>
3191
3192         <class id="sin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
3193                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
3194                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3195                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
3196                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3197                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3198                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3199                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3200                         <field reporter:label="Vale" name="value" reporter:datatype="text"/>
3201                 </fields>
3202                 <links>
3203                         <link field="item" reltype="has_a" key="id" map="" class="si"/>
3204                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3205                 </links>
3206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3207                 </permacrud>
3208         </class>
3209
3210         <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
3211                 <fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
3212                         <field name="id" reporter:datatype="id" />
3213                         <field name="distribution" reporter:datatype="link"/>
3214                         <field name="generated_coverage" reporter:datatype="text"/>
3215                         <field name="textual_holdings" reporter:datatype="text"/>
3216                 </fields>
3217                 <links>
3218                         <link field="distribution" reltype="has_a" key="id" map="" class="sd"/>
3219                 </links>
3220         </class>
3221
3222         <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
3223                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
3224                         <field name="id" reporter:datatype="id" />
3225                         <field name="distribution" reporter:datatype="link"/>
3226                         <field name="generated_coverage" reporter:datatype="text"/>
3227                         <field name="textual_holdings" reporter:datatype="text"/>
3228                 </fields>
3229                 <links>
3230                         <link field="distribution" reltype="has_a" key="id" map="" class="sd"/>
3231                 </links>
3232         </class>
3233
3234         <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
3235                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
3236                         <field name="id" reporter:datatype="id" />
3237                         <field name="distribution" reporter:datatype="link"/>
3238                         <field name="generated_coverage" reporter:datatype="text"/>
3239                         <field name="textual_holdings" reporter:datatype="text"/>
3240                 </fields>
3241                 <links>
3242                         <link field="distribution" reltype="has_a" key="id" map="" class="sd"/>
3243                 </links>
3244         </class>
3245
3246         <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">
3247                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
3248                         <field name="id" reporter:datatype="id" />
3249                         <field name="owning_copy" reporter:datatype="link"/>
3250                         <field name="stat_cat" reporter:datatype="link"/>
3251                         <field name="stat_cat_entry" reporter:datatype="link"/>
3252                 </fields>
3253                 <links>
3254                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3255                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
3256                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
3257                 </links>
3258         </class>
3259         <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">
3260                 <fields oils_persist:primary="code">
3261                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3262                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3263                 </fields>
3264                 <links/>
3265         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3266             <actions>
3267                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3268                 <retrieve/>
3269                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3270                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3271             </actions>
3272         </permacrud>
3273         </class>
3274         <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">
3275                 <fields oils_persist:primary="code">
3276                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
3277                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3278                 </fields>
3279                 <links/>
3280         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3281             <actions>
3282                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3283                 <retrieve/>
3284                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3285                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3286             </actions>
3287         </permacrud>
3288         </class>
3289         <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">
3290                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
3291                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
3292                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
3293                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
3294                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
3295                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
3296                 </fields>
3297                 <links>
3298             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3299         </links>
3300         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3301             <actions>
3302                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3303                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3304                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3305                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3306             </actions>
3307         </permacrud>
3308         </class>
3309         <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">
3310                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
3311                         <field name="id" reporter:datatype="id" />
3312                         <field name="name" reporter:datatype="text"/>
3313                 </fields>
3314                 <links/>
3315         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3316             <actions>
3317                 <create permission="CREATE_LASSO" global_required="true"/>
3318                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
3319                 <update permission="UPDATE_LASSO" global_required="true"/>
3320                 <delete permission="DELETE_LASSO" global_required="true"/>
3321             </actions>
3322         </permacrud>
3323         </class>
3324         <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">
3325                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
3326                         <field name="id" reporter:datatype="id" />
3327                         <field name="lasso" reporter:datatype="link"/>
3328                         <field name="org_unit" reporter:datatype="org_unit"/>
3329                 </fields>
3330                 <links>
3331                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
3332                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3333                 </links>
3334         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3335             <actions>
3336                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
3337                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
3338                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
3339                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
3340             </actions>
3341         </permacrud>
3342         </class>
3343         <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">
3344                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3345                         <field name="id" reporter:datatype="id" />
3346                         <field name="from_org" reporter:datatype="org_unit"/>
3347                         <field name="to_org" reporter:datatype="org_unit"/>
3348                         <field name="prox" reporter:datatype="int" />
3349                 </fields>
3350                 <links>
3351                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
3352                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
3353                 </links>
3354         </class>
3355         <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">
3356                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3357                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3358                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
3359                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
3360                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
3361                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
3362                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
3363                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
3364                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
3365                 </fields>
3366                 <links/>
3367         </class>
3368         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
3369                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
3370                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
3371                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3372                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
3373                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
3374                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
3375                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3376                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
3377                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3378                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
3379                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
3380                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
3381                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
3382                 </fields>
3383                 <links>
3384                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3385                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
3386                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
3387                 </links>
3388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3389             <actions>
3390                 <create permission="ADMIN_SURVEY" context_field="owner"/>
3391                 <retrieve/>
3392                 <update permission="ADMIN_SURVEY" context_field="owner"/>
3393                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
3394             </actions>
3395         </permacrud>
3396         </class>
3397         <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">
3398                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
3399                         <field name="address_type"  reporter:datatype="text"/>
3400                         <field name="city"  reporter:datatype="text"/>
3401                         <field name="country"  reporter:datatype="text"/>
3402                         <field name="county"  reporter:datatype="text"/>
3403                         <field name="id" reporter:datatype="id" />
3404                         <field name="org_unit" reporter:datatype="org_unit"/>
3405                         <field name="post_code"  reporter:datatype="text"/>
3406                         <field name="state"  reporter:datatype="text"/>
3407                         <field name="street1"  reporter:datatype="text"/>
3408                         <field name="street2"  reporter:datatype="text"/>
3409                         <field name="valid" reporter:datatype="bool"/>
3410                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
3411                 </fields>
3412                 <links>
3413                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3414                 </links>
3415         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3416             <actions>
3417                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
3418                 <retrieve/>
3419                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
3420                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
3421             </actions>
3422         </permacrud>
3423         </class>
3424         <class id="ahr" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
3425                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
3426                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
3427                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
3428                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
3429                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
3430                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3431                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
3432                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
3433                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
3434                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
3435                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
3436                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
3437                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
3438                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
3439                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
3440                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
3441                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
3442                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
3443                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
3444                         <field reporter:label="Item Selection Depth" name="selection_depth" />
3445                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
3446                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
3447                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
3448                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
3449                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
3450                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
3451                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
3452                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
3453                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
3454                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
3455                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
3456                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
3457                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
3458                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
3459                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
3460                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
3461                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
3462                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
3463                 </fields>
3464                 <links>
3465                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
3466                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
3467                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
3468                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
3469                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
3470                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3471                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3472                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3473                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
3474                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
3475                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
3476                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
3477                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
3478                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
3479                 </links>
3480         </class>
3481         <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">
3482                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
3483                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3484                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
3485                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3486                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
3487                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
3488                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
3489                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
3490                 </fields>
3491                 <links>
3492                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3493                 </links>
3494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3495                         <actions>
3496                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
3497                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
3498                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
3499                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
3500                         </actions>
3501                 </permacrud>
3502         </class>
3503         <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">
3504                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
3505                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3506                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
3507                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
3508                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
3509                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
3510                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3511                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3512                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
3513                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
3514                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
3515                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
3516                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
3517                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3518                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
3519                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
3520                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
3521                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3522                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3523                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3524                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3525                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
3526                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3527                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
3528                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
3529                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3530                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
3531                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3532                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3533                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3534                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
3535                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
3536                 </fields>
3537                 <links>
3538                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
3539                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
3540                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
3541                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
3542                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
3543                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
3544                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
3545                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
3546                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
3547                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
3548                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
3549                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
3550                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
3551                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
3552                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
3553                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
3554                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
3555                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
3556                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
3557                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
3558                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
3559                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
3560                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
3561                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
3562                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
3563                 </links>
3564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3565             <actions>
3566                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
3567                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
3568                     <context field="id"/>
3569                     <context field="parent_ou"/>
3570                                 </retrieve>
3571                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
3572                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
3573             </actions>
3574         </permacrud>
3575         </class>
3576         <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">
3577                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
3578                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3579                         <field name="btype" reporter:datatype="text"/>
3580                         <field name="id" reporter:datatype="id" />
3581                         <field name="name"  reporter:datatype="text"/>
3582                         <field name="owner" reporter:datatype="link"/>
3583                         <field name="pub" reporter:datatype="bool"/>
3584                         <field name="create_time" reporter:datatype="timestamp" />
3585                 </fields>
3586                 <links>
3587                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3588                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
3589                 </links>
3590         </class>
3591         <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">
3592                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
3593                         <field name="id" reporter:datatype="id" />
3594                         <field name="bucket" reporter:datatype="link"/>
3595                         <field name="note" reporter:datatype="text" />
3596                 </fields>
3597                 <links>
3598                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3599                 </links>
3600         </class>
3601         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
3602                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
3603                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3604                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3606                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3607                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3608                 </fields>
3609                 <links>
3610                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3611                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
3612                 </links>
3613         </class>
3614         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
3615                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
3616                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
3617                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3618                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
3619                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3620                 </fields>
3621                 <links>
3622                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3623                 </links>
3624         </class>
3625         <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">
3626                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
3627                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3628                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3629                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3630                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3631                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3632                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
3633                 </fields>
3634                 <links>
3635                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3636                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
3637                 </links>
3638         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3639             <actions>
3640                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
3641                 <retrieve />
3642                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
3643                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
3644             </actions>
3645         </permacrud>
3646         </class>
3647         <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">
3648                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
3649                         <field name="field" reporter:datatype="link"/>
3650                         <field name="id" reporter:datatype="id" />
3651                         <field name="source" reporter:datatype="link"/>
3652                         <field name="value"  reporter:datatype="text"/>
3653                 </fields>
3654                 <links>
3655                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3656                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3657                 </links>
3658         </class>
3659         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
3660                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
3661                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3662                         <field name="btype" reporter:datatype="text"/>
3663                         <field name="id" reporter:datatype="id" />
3664                         <field name="name"  reporter:datatype="text"/>
3665                         <field name="owner" reporter:datatype="link"/>
3666                         <field name="pub" reporter:datatype="bool"/>
3667                         <field name="create_time" reporter:datatype="timestamp" />
3668                 </fields>
3669                 <links>
3670                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3671                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
3672                 </links>
3673         </class>
3674         <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">
3675                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
3676                         <field name="id" reporter:datatype="id" />
3677                         <field name="bucket" reporter:datatype="link"/>
3678                         <field name="note" reporter:datatype="text" />
3679                 </fields>
3680                 <links>
3681                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3682                 </links>
3683         </class>
3684         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
3685                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3686                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3687                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3688                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3689                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
3690                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
3691                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3692                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3693                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3694                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3695                 </fields>
3696                 <links>
3697                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3698                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3699                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3700                 </links>
3701         </class>
3702         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
3703                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
3704                         <field name="id" reporter:datatype="id" />
3705                         <field name="ind1" />
3706                         <field name="ind2" />
3707                         <field name="record" />
3708                         <field name="subfield" />
3709                         <field name="tag" />
3710                         <field name="value" />
3711                 </fields>
3712                 <links>
3713                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3714                 </links>
3715         </class>
3716         <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">
3717                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
3718                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
3719                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3720                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
3721                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3722                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3723                 </fields>
3724                 <links>
3725                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3726                 </links>
3727         </class>
3728         <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">
3729                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
3730                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3731                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
3732                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
3733                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
3734                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3735                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3736                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
3737                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
3738                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
3739                 </fields>
3740                 <links>
3741                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
3742                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
3743                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
3744                 </links>
3745         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3746             <actions>
3747                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
3748                 <retrieve/>
3749                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
3750                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
3751             </actions>
3752         </permacrud>
3753         </class>
3754         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
3755                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
3756                         <field name="create_date" reporter:datatype="timestamp"/>
3757                         <field name="creator" reporter:datatype="link"/>
3758                         <field name="edit_date" reporter:datatype="timestamp"/>
3759                         <field name="editor" reporter:datatype="link"/>
3760                         <field name="id" reporter:datatype="id" />
3761                         <field name="pub" reporter:datatype="bool"/>
3762                         <field name="record" reporter:datatype="link"/>
3763                         <field name="value"  reporter:datatype="text"/>
3764                 </fields>
3765                 <links>
3766                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3767                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3768                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3769                 </links>
3770         </class>
3771         <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">
3772                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3773                         <field name="balance_owed" reporter:datatype="money" />
3774                         <field name="total_owed" reporter:datatype="money" />
3775                         <field name="total_paid" reporter:datatype="money" />
3776                         <field name="usr" reporter:datatype="link"/>
3777                 </fields>
3778                 <links>
3779                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3780                 </links>
3781         </class>
3782         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
3783                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3784                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
3785                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3786                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
3787                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3788                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
3789                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
3790                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3791                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3792                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3793                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3794                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3795                 </fields>
3796                 <links>
3797                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3798                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3799                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3800                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3801                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3802                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3803                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3804                 </links>
3805         </class>
3806         <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">
3807                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
3808                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
3809                         <field name="quality" reporter:datatype="int" />
3810                         <field name="source" reporter:datatype="text"/>
3811                         <field name="transcendant" reporter:datatype="bool"/>
3812                 </fields>
3813                 <links/>
3814         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3815             <actions>
3816                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
3817                 <retrieve/>
3818                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
3819                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
3820             </actions>
3821         </permacrud>
3822         </class>
3823         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
3824                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3825                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3826                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3827                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3828                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3829                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3830                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3831                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3832                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3833                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3834                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3835                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3836                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3837                 </fields>
3838                 <links>
3839                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3840                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3841                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3842                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3843                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3844                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3845                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3846                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3847                 </links>
3848         </class>
3849         <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">
3850                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
3851                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3852                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3853                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3854                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
3855                 </fields>
3856                 <links>
3857                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3858                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3859                 </links>
3860         </class>
3861         <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">
3862                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
3863                         <field name="bucket" reporter:datatype="link"/>
3864                         <field name="id" reporter:datatype="id" />
3865                         <field name="target_user" reporter:datatype="link"/>
3866                         <field name="create_time" reporter:datatype="timestamp" />
3867                         <field name="pos" reporter:datatype="int" />
3868                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3869                 </fields>
3870                 <links>
3871                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
3872                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3873             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
3874                 </links>
3875         </class>
3876         <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">
3877                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
3878                         <field name="id" reporter:datatype="id" />
3879                         <field name="item" reporter:datatype="link"/>
3880                         <field name="note" reporter:datatype="text" />
3881                 </fields>
3882                 <links>
3883                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
3884                 </links>
3885         </class>
3886         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
3887                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3888                         <field name="balance_owed" reporter:datatype="money" />
3889                         <field name="total_owed" reporter:datatype="money" />
3890                         <field name="total_paid" reporter:datatype="money" />
3891                         <field name="usr" reporter:datatype="link"/>
3892                 </fields>
3893                 <links>
3894                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3895                 </links>
3896         </class>
3897         <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">
3898                 <fields oils_persist:primary="code" oils_persist:sequence="">
3899                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
3900                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3901                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3902                 </fields>
3903                 <links/>
3904         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3905             <actions>
3906                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3907                 <retrieve/>
3908                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3909                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3910             </actions>
3911         </permacrud>
3912         </class>
3913         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
3914                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3915                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3916                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3917                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3918                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3919                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3920                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3921                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3922                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3923                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3924                 </fields>
3925                 <links>
3926                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3927                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3928                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3929                 </links>
3930         </class>
3931         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
3932                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3933                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3934                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3935                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3936                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3937                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3938                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3939                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3940                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3941                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3942                 </fields>
3943                 <links>
3944                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3945                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3946                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3947                 </links>
3948         </class>
3949         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
3950                 <fields oils_persist:primary="id" oils_persist:sequence="">
3951                         <field name="checkin_lib" reporter:datatype="link"/>
3952                         <field name="checkin_staff" reporter:datatype="link"/>
3953                         <field name="checkin_time" reporter:datatype="timestamp"/>
3954                         <field name="circ_lib"  reporter:datatype="org_unit"/>
3955                         <field name="circ_staff" reporter:datatype="link"/>
3956                         <field name="desk_renewal" reporter:datatype="bool"/>
3957                         <field name="due_date" reporter:datatype="timestamp"/>
3958                         <field name="duration" reporter:datatype="interval"/>
3959                         <field name="duration_rule" reporter:datatype="link"/>
3960                         <field name="fine_interval" reporter:datatype="interval"/>
3961                         <field name="id" reporter:datatype="id" />
3962                         <field name="max_fine" reporter:datatype="money" />
3963                         <field name="max_fine_rule" reporter:datatype="link"/>
3964                         <field name="opac_renewal" reporter:datatype="bool"/>
3965                         <field name="phone_renewal" reporter:datatype="bool"/>
3966                         <field name="recurring_fine" reporter:datatype="money" />
3967                         <field name="recurring_fine_rule" reporter:datatype="link"/>
3968                         <field name="renewal_remaining" reporter:datatype="int" />
3969                         <field name="stop_fines" reporter:datatype="text"/>
3970                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
3971                         <field name="target_copy" reporter:datatype="link"/>
3972                         <field name="usr" reporter:datatype="link"/>
3973                         <field name="xact_finish" reporter:datatype="timestamp" />
3974                         <field name="xact_start" reporter:datatype="timestamp" />
3975                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3976                 </fields>
3977                 <links>
3978                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3979                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3980                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3981                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3982                 </links>
3983         </class>
3984         <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">
3985                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
3986                         <field name="field" reporter:datatype="link"/>
3987                         <field name="id" reporter:datatype="id" />
3988                         <field name="source" reporter:datatype="link"/>
3989                         <field name="value" reporter:datatype="text"/>
3990                 </fields>
3991                 <links>
3992                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3993                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3994                 </links>
3995         </class>
3996         <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">
3997                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
3998                         <field name="high" reporter:datatype="money" />
3999                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4000                         <field name="low" reporter:datatype="money" />
4001                         <field name="name" reporter:datatype="text"/>
4002                         <field name="normal" reporter:datatype="money" />
4003                         <field name="recurrence_interval" reporter:datatype="interval"/>
4004                 </fields>
4005                 <links/>
4006         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4007             <actions>
4008                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4009                 <retrieve/>
4010                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4011                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4012             </actions>
4013         </permacrud>
4014         </class>
4015         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4016                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4017                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4018                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4019                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4020                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4021                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4022                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4023                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4024                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4025                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4026                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4027                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4028                 </fields>
4029                 <links>
4030                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4031                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4032                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4033                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4034                 </links>
4035         </class>
4036         <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">
4037                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4038                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4039                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4040                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4041                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4042                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4043                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4044                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4045                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4046                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4047                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4048                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4049                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4050                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4051                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4052                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4053                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4054                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4055                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4056                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4057                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4058                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4059                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4060                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4061                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4062                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4063                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4064                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4065                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4066                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4067                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4068                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4069                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4070                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4071                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4072                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4073                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4074                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4075                 </fields>
4076                 <links>
4077                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4078                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4079                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4080                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4081                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4082                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4083                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4084                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4085                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4086                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4087                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4088                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4089                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4090                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4091                 </links>
4092         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4093             <actions>
4094                 <create permission="CREATE_COPY">
4095                     <context link="call_number" field="owning_lib"/>
4096                 </create>
4097                 <retrieve/>
4098                 <update permission="UPDATE_COPY">
4099                     <context link="call_number" field="owning_lib"/>
4100                 </update>
4101                 <delete permission="DELETE_COPY">
4102                     <context link="call_number" field="owning_lib"/>
4103                 </delete>
4104             </actions>
4105         </permacrud>
4106         </class>
4107
4108         <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">
4109                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
4110                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4111                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
4112                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4113                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4114                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4115                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4116                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4117                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
4118                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
4119                         <field reporter:label="Location" name="location" reporter:datatype="int"/>
4120                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4121                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4122                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
4123                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
4124                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
4125                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
4126                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
4127                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4128                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
4129                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
4130                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
4131                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4132                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4133                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
4134                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
4135                 </fields>
4136                 <links>
4137                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4138                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4139                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4140                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4141                 </links>
4142                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4143                 </permacrud>
4144         </class>
4145
4146         <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">
4147                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
4148                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
4149                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4150                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4151                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
4152                 </fields>
4153                 <links/>
4154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4155             <actions>
4156                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4157                 <retrieve/>
4158                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4159                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4160             </actions>
4161         </permacrud>
4162         </class>
4163         <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">
4164                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
4165                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
4166                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4167                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4168                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
4169                 </fields>
4170                 <links/>
4171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4172             <actions>
4173                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4174                 <retrieve/>
4175                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4176                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4177             </actions>
4178         </permacrud>
4179         </class>
4180         <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">
4181                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
4182                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4183                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4184                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4185                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4186                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
4187                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
4188                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
4189                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
4190                 </fields>
4191                 <links>
4192                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
4193                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
4194                 </links>
4195         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4196             <actions>
4197                 <create permission="CREATE_PERM" global_required="true"/>
4198                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4199                 <update permission="UPDATE_PERM" global_required="true"/>
4200                 <delete permission="DELETE_PERM" global_required="true"/>
4201             </actions>
4202         </permacrud>
4203         </class>
4204         <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">
4205                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
4206                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4207                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
4208                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
4209                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
4210                 </fields>
4211                 <links>
4212                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
4213                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
4214                 </links>
4215         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4216             <actions>
4217                 <create permission="ADMIN_SURVEY">
4218                     <context link="question" jump="survey" field="owner"/>
4219                 </create>
4220                 <retrieve/>
4221                 <update permission="ADMIN_SURVEY">
4222                     <context link="question" jump="survey" field="owner"/>
4223                 </update>
4224                 <delete permission="ADMIN_SURVEY">
4225                     <context link="question" jump="survey" field="owner"/>
4226                 </delete>
4227             </actions>
4228         </permacrud>
4229         </class>
4230         <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">
4231                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
4232                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4233                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
4234                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
4235                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
4236                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
4237                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
4238                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
4239                 </fields>
4240                 <links>
4241                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
4242                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4243                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
4244                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4245                 </links>
4246         </class>
4247         <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">
4248                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4249                         <field name="balance_owed" reporter:datatype="money" />
4250                         <field name="total_owed" reporter:datatype="money" />
4251                         <field name="total_paid" reporter:datatype="money" />
4252                         <field name="usr" reporter:datatype="link"/>
4253                 </fields>
4254                 <links>
4255                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4256                 </links>
4257         </class>
4258         <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">
4259                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
4260                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
4261                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
4262                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
4263                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4264                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4265                 </fields>
4266                 <links>
4267                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4268                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4269                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4270                 </links>
4271         </class>
4272         <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">
4273                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
4274                         <field name="field" reporter:datatype="link"/>
4275                         <field name="id" reporter:datatype="id" />
4276                         <field name="source" reporter:datatype="link"/>
4277                         <field name="value" reporter:datatype="text"/>
4278                 </fields>
4279                 <links>
4280                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4281                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4282                 </links>
4283         </class>
4284         <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">
4285                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
4286                         <field name="field" reporter:datatype="link"/>
4287                         <field name="id" reporter:datatype="id" />
4288                         <field name="source" reporter:datatype="link"/>
4289                         <field name="value" reporter:datatype="text"/>
4290                 </fields>
4291                 <links>
4292                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4293                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4294                 </links>
4295         </class>
4296         <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">
4297                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
4298                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4299                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
4300                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
4301                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
4302                 </fields>
4303                 <links>
4304                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
4305                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4306                 </links>
4307         </class>
4308         <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">
4309                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
4310                         <field name="depth" reporter:datatype="int" />
4311                         <field name="grantable" reporter:datatype="bool"/>
4312                         <field name="grp" reporter:datatype="link"/>
4313                         <field name="id" reporter:datatype="id" />
4314                         <field name="perm" reporter:datatype="link"/>
4315                 </fields>
4316                 <links>
4317                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4318                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4319                 </links>
4320         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4321             <actions>
4322                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
4323                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
4324                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
4325                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
4326             </actions>
4327         </permacrud>
4328         </class>
4329         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
4330                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
4331                         <field name="items" oils_persist:virtual="true" />
4332                         <field name="btype" reporter:datatype="text"/>
4333                         <field name="id" reporter:datatype="id" />
4334                         <field name="name" reporter:datatype="text"/>
4335                         <field name="owner" reporter:datatype="link"/>
4336                         <field name="pub" reporter:datatype="bool"/>
4337                         <field name="create_time" reporter:datatype="timestamp" />
4338                 </fields>
4339                 <links>
4340                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4341                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
4342                 </links>
4343         </class>
4344         <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">
4345                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
4346                         <field name="id" reporter:datatype="id" />
4347                         <field name="bucket" reporter:datatype="link"/>
4348                         <field name="note" reporter:datatype="text" />
4349                 </fields>
4350                 <links>
4351                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
4352                 </links>
4353         </class>
4354         <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">
4355                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
4356                         <field name="id" reporter:datatype="int" />
4357                         <field name="usr" reporter:datatype="link"/>
4358                         <field name="work_ou" reporter:datatype="link"/>
4359                 </fields>
4360                 <links>
4361                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4362                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
4363                 </links>
4364         </class>
4365         <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">
4366                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
4367                         <field name="depth" reporter:datatype="int"/>
4368                         <field name="grantable" reporter:datatype="bool"/>
4369                         <field name="id" reporter:datatype="id" />
4370                         <field name="perm" reporter:datatype="link"/>
4371                         <field name="usr" reporter:datatype="link"/>
4372                 </fields>
4373                 <links>
4374                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4375                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4376                 </links>
4377         </class>
4378         <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">
4379                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
4380                         <field name="object_id" reporter:datatype="text"/>
4381                         <field name="grantable" reporter:datatype="bool"/>
4382                         <field name="id" reporter:datatype="id" />
4383                         <field name="perm" reporter:datatype="link"/>
4384                         <field name="usr" reporter:datatype="link"/>
4385                         <field name="object_type" reporter:datatype="text"/>
4386                 </fields>
4387                 <links>
4388                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4389                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4390                 </links>
4391         </class>
4392         <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">
4393                 <fields oils_persist:primary="id" oils_persist:sequence="">
4394                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4395                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4396                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4397                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4398                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4399                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4400                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4401                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4402                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4403                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4404                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4405                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4406                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4407                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4408                 </fields>
4409                 <links>
4410                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4411                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4412                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4413                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4414                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4415                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4416                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4417                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4418                 </links>
4419         </class>
4420         <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">
4421                 <fields oils_persist:primary="id" oils_persist:sequence="">
4422                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4423                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4424                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4425                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4426                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4427                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4428                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4429                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4430                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4431                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4432                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4433                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4434                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4435                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4436                 </fields>
4437                 <links>
4438                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4439                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4440                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4441                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4442                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4443                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4444                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4445                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4446                 </links>
4447         </class>
4448         <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">
4449                 <fields oils_persist:primary="id" oils_persist:sequence="">
4450                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4451                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4452                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4453                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4454                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4455                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4456                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4457                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4458                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4459                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4460                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4461                 </fields>
4462                 <links>
4463                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4464                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4465                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4466                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4467                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4468                 </links>
4469         </class>
4470         <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">
4471                 <fields oils_persist:primary="id" oils_persist:sequence="">
4472                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4473                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4474                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4475                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4476                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4477                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4478                         <field reporter:label="Accepting User" name="accepting_usr" />
4479                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
4480                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4481                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4482                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4483                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4484                 </fields>
4485                 <links>
4486                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4487                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4488                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4489                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4490                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4491                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4492                 </links>
4493         </class>
4494         <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">
4495                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
4496                         <field name="bucket" reporter:datatype="link"/>
4497                         <field name="id" reporter:datatype="id" />
4498                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
4499                         <field name="create_time" reporter:datatype="timestamp" />
4500                         <field name="pos" reporter:datatype="int" />
4501                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4502                 </fields>
4503                 <links>
4504                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
4505                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4506             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
4507                 </links>
4508         </class>
4509         <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">
4510                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
4511                         <field name="id" reporter:datatype="id" />
4512                         <field name="item" reporter:datatype="link"/>
4513                         <field name="note" reporter:datatype="text" />
4514                 </fields>
4515                 <links>
4516                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
4517                 </links>
4518         </class>
4519         <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">
4520                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
4521                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
4522                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4523                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4524                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4525                 </fields>
4526                 <links>
4527                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4528                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4529                 </links>
4530         </class>
4531
4532         <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">
4533                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
4534                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
4535                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4536                 </fields>
4537                 <links/>
4538         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4539             <actions>
4540                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4541                 <retrieve/>
4542                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4543                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4544             </actions>
4545         </permacrud>
4546         </class>
4547
4548
4549         <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">
4550                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4551                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4552                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4553                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4554                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
4555                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4556                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4557                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4558                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4559                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4560                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4561                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4562                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4563                 </fields>
4564                 <links>
4565                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4566                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
4567                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4568                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4569                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4570                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4571                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4572                 </links>
4573         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4574             <actions>
4575                 <create permission="TRANSIT_COPY">
4576                     <context link="target_copy" field="owner"/>
4577                 </create>
4578                 <retrieve/>
4579                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4580                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4581             </actions>
4582         </permacrud>
4583         </class>
4584         <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">
4585                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4586                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4587                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4588                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4589                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
4590                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4591                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4592                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4593                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4594                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4595                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4596                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4597                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4598                 </fields>
4599                 <links>
4600                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4601                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4602                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4603                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4604                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4605                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4606                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4607                 </links>
4608         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4609             <actions>
4610                 <create permission="TRANSIT_COPY" context_field="owner">
4611                     <context link="target_copy" field="circ_lib"/>
4612                 </create>
4613                 <retrieve/>
4614                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4615                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4616             </actions>
4617         </permacrud>
4618         </class>
4619         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
4620                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
4621                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4622                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
4623                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
4624                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
4625                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4626                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
4627                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4628                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
4629                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4630                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
4631                 </fields>
4632                 <links>
4633                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4634                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
4635                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
4636                 </links>
4637         </class>
4638         <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">
4639                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
4640                         <field name="grp" />
4641                         <field name="id" reporter:datatype="id" />
4642                         <field name="usr" />
4643                 </fields>
4644                 <links>
4645                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4646                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4647                 </links>
4648         </class>
4649         <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">
4650                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
4651                         <field name="id" reporter:datatype="id" />
4652                         <field name="fq_field" reporter:datatype="text"/>
4653                         <field name="identity_value" reporter:datatype="text"/>
4654                         <field name="translation" reporter:datatype="text"/>
4655                         <field name="string" reporter:datatype="text"/>
4656                 </fields>
4657                 <links>
4658                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
4659                 </links>
4660         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4661             <actions>
4662                 <create permission="CREATE_TRANSLATION" global_required="true"/>
4663                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
4664                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
4665                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
4666             </actions>
4667         </permacrud>
4668         </class>
4669         <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">
4670                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
4671                         <field name="id" reporter:datatype="id" />
4672                         <field name="fm_class" reporter:datatype="text"/>
4673                         <field name="field" reporter:datatype="text"/>
4674                         <field name="owner" reporter:datatype="org_unit"/>
4675                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
4676                 </fields>
4677                 <links>
4678                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4679                 </links>
4680         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4681             <actions>
4682                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4683                 <retrieve/>
4684                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4685                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4686             </actions>
4687         </permacrud>
4688         </class>
4689         <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">
4690                 <fields oils_persist:primary="code">
4691                         <field name="code" reporter:datatype="id" />
4692                         <field name="marc_code" reporter:datatype="text"/>
4693                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4694                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4695                 </fields>
4696                 <links/>
4697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4698             <actions>
4699                 <create permission="CREATE_LOCALE" global_required="true"/>
4700                 <retrieve/>
4701                 <update permission="UPDATE_LOCALE" global_required="true"/>
4702                 <delete permission="DELETE_LOCALE" global_required="true"/>
4703             </actions>
4704         </permacrud>
4705         </class>
4706         <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">
4707                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
4708                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4709                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
4710                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
4711             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
4712                 </fields>
4713                 <links>
4714                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4715                 </links>
4716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4717             <actions>
4718                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
4719                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
4720                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
4721                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
4722             </actions>
4723         </permacrud>
4724         </class>
4725
4726         <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">
4727                 <fields oils_persist:primary="id">
4728                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4729                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4730                 </fields>
4731                 <links/>
4732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4733             <actions>
4734                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4735                 <retrieve/>
4736                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4737                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4738             </actions>
4739         </permacrud>
4740         </class>
4741
4742         <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">
4743                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
4744                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4745                         <field reporter:label="User" name="usr" reporter:datatype="link" />
4746                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
4747                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
4748                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
4749                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
4750                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
4751                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
4752                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
4753                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
4754                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
4755                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
4756                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
4757                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
4758                         <field reporter:label="Title" name="title" reporter:datatype="text" />
4759                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
4760                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4761                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
4762                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
4763                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
4764                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
4765                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
4766                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
4767                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
4768                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
4769                 </fields>
4770                 <links>
4771                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4772                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4773                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4774                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
4775                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
4776                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
4777                 </links>
4778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4779             <actions>
4780                 <create permission="user_request.create">
4781                     <context link="usr" field="home_ou"/>
4782                                 </create>
4783                 <retrieve permission="user_request.view">
4784                     <context link="usr" field="home_ou"/>
4785                                 </retrieve>
4786                 <update permission="user_request.update">
4787                     <context link="usr" field="home_ou"/>
4788                                 </update>
4789                 <delete permission="user_request.delete">
4790                     <context link="usr" field="home_ou"/>
4791                                 </delete>
4792             </actions>
4793         </permacrud>
4794         </class>
4795
4796         <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">
4797                 <fields oils_persist:primary="code">
4798                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
4799                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4800                 </fields>
4801                 <links/>
4802         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4803             <actions>
4804                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4805                 <retrieve/>
4806                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4807                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4808             </actions>
4809         </permacrud>
4810         </class>
4811
4812         <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">
4813                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
4814                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
4815                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
4816                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
4817                         <field reporter:label="Ratio" name="ratio" />
4818                 </fields>
4819                 <links>
4820                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
4821                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
4822                 </links>
4823                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4824                         <actions>
4825                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4826                                 <retrieve/>
4827                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4828                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4829                         </actions>
4830                 </permacrud>
4831         </class>
4832
4833         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
4834                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
4835                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4836                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4837                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4838                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4839                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4840                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
4841                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
4842                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
4843                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
4844                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
4845                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
4846                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4847                         <field reporter:label="Email" name="email" reporter:datatype="text" />
4848                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
4849                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
4850                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
4851                 </fields>
4852                 <links>
4853                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4854                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4855             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
4856             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
4857             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
4858                 </links>
4859         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4860             <actions>
4861                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
4862                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
4863                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
4864                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
4865             </actions>
4866         </permacrud>
4867         </class>
4868
4869         <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">
4870                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
4871                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
4872                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4873                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4874                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4875                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4876                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4877                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
4878                 </fields>
4879                 <links>
4880                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4881                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4882                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4883                 </links>
4884         </class>
4885
4886         <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">
4887                 <fields oils_persist:primary="code">
4888                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
4889                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4890                 </fields>
4891                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4892             <actions>
4893                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
4894                 <retrieve/>
4895                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
4896                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
4897             </actions>
4898                 </permacrud>
4899         </class>
4900
4901         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
4902                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
4903                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
4904                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
4905                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4906                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
4907                         <field reporter:label="Receive Date/Time" name="recv_date" reporter:datatype="timestamp" />
4908                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
4909                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
4910                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
4911                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
4912                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
4913                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4914                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
4915                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
4916                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
4917                 </fields>
4918                 <links>
4919                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
4920                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4921                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
4922                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
4923                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
4924                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
4925                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
4926                 </links>
4927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4928             <actions>
4929                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
4930                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
4931                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
4932                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
4933             </actions>
4934         </permacrud>
4935         </class>
4936
4937         <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">
4938                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
4939                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4940                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
4941                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
4942                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
4943                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
4944                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
4945                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4946                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
4947                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
4948                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
4949                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
4950                 </fields>
4951                 <links>
4952                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
4953                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4954                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4955                 </links>
4956         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4957             <actions>
4958                 <create   permission="ADMIN_INVOICE">
4959                                         <context link="invoice" field="receiver"/>
4960                                 </create>
4961                 <retrieve permission="ADMIN_INVOICE">
4962                                         <context link="invoice" field="receiver"/>
4963                                 </retrieve>
4964                 <update   permission="ADMIN_INVOICE">
4965                                         <context link="invoice" field="receiver"/>
4966                                 </update>
4967                                 <delete   permission="ADMIN_INVOICE">
4968                                         <context link="invoice" field="receiver"/>
4969                                 </delete>
4970             </actions>
4971         </permacrud>
4972         </class>
4973
4974         <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">
4975                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
4976                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4977                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
4978                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
4979                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
4980                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
4981                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
4982                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4983                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4984                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
4985                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
4986                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
4987                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
4988                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
4989                 </fields>
4990                 <links>
4991                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
4992                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4993                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
4994                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
4995                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4996                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
4997                 </links>
4998         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4999             <actions>
5000                 <create   permission="ADMIN_INVOICE">
5001                                         <context link="invoice" field="receiver"/>
5002                                 </create>
5003                 <retrieve permission="ADMIN_INVOICE">
5004                                         <context link="invoice" field="receiver"/>
5005                                 </retrieve>
5006                 <update   permission="ADMIN_INVOICE">
5007                                         <context link="invoice" field="receiver"/>
5008                                 </update>
5009                                 <delete   permission="ADMIN_INVOICE">
5010                                         <context link="invoice" field="receiver"/>
5011                                 </delete>
5012             </actions>
5013         </permacrud>
5014         </class>
5015
5016         <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">
5017                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5018                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5019                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5020                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5021                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5022                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5023                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5024                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5025                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5026                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5027                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5028                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5029                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5030                 </fields>
5031                 <links>
5032                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5033                 </links>
5034         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5035             <actions>
5036                 <create permission="ADMIN_PROVIDER">
5037                     <context link="provider" field="owner"/>
5038                 </create>
5039                 <retrieve permission="ADMIN_PROVIDER">
5040                     <context link="provider" field="owner"/>
5041                 </retrieve>
5042                 <update permission="ADMIN_PROVIDER">
5043                     <context link="provider" field="owner"/>
5044                 </update>
5045                 <delete permission="ADMIN_PROVIDER">
5046                     <context link="provider" field="owner"/>
5047                 </delete>
5048             </actions>
5049         </permacrud>
5050         </class>
5051
5052         <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">
5053                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5054                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5055                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5056                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5057                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5058                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5059                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5060         </fields>
5061                 <links>
5062                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5063                 </links>
5064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5065             <actions>
5066                 <create permission="ADMIN_PROVIDER">
5067                     <context link="provider" field="owner"/>
5068                 </create>
5069                 <retrieve permission="ADMIN_PROVIDER">
5070                     <context link="provider" field="owner"/>
5071                 </retrieve>
5072                 <update permission="ADMIN_PROVIDER">
5073                     <context link="provider" field="owner"/>
5074                 </update>
5075                 <delete permission="ADMIN_PROVIDER">
5076                     <context link="provider" field="owner"/>
5077                 </delete>
5078             </actions>
5079         </permacrud>
5080     </class>
5081         <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">
5082                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
5083                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
5084                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5085                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5086                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5087                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
5088                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5089                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5090                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
5091                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
5092                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
5093                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
5094                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5095                 </fields>
5096                 <links>
5097                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
5098                 </links>
5099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5100             <actions>
5101                 <create permission="ADMIN_PROVIDER">
5102                     <context link="contact" jump='provider' field="owner"/>
5103                 </create>
5104                 <retrieve permission="ADMIN_PROVIDER">
5105                     <context link="contact" jump='provider' field="owner"/>
5106                 </retrieve>
5107                 <update permission="ADMIN_PROVIDER">
5108                     <context link="contact" jump='provider' field="owner"/>
5109                 </update>
5110                 <delete permission="ADMIN_PROVIDER">
5111                     <context link="contact" jump='provider' field="owner"/>
5112                 </delete>
5113             </actions>
5114         </permacrud>
5115         </class>
5116
5117         <class id="acqftr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
5118                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
5119                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
5120                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
5121                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
5122                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
5123                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
5124                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
5125                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
5126                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5127                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
5128                 </fields>
5129                 <links>
5130                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
5131                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
5132                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
5133                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
5134                 </links>
5135                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5136                 </permacrud>
5137         </class>
5138
5139         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
5140                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
5141                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='id'/>
5142                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
5143                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
5144                 </fields>
5145                 <links>
5146             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
5147                 </links>
5148                 <!--
5149                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5150                         But here's what it should look like if we ever do use pcrud.
5151                 -->
5152                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5153                         <actions>
5154                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5155                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5156                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5157                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5158                         </actions>
5159                 </permacrud>
5160         </class>
5161
5162         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
5163                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
5164                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='id'/>
5165                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
5166                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
5167                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
5168                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
5169                 </fields>
5170                 <links>
5171                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5172                 </links>
5173                 <!--
5174                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5175                         But here's what it should look like if we ever do use pcrud.
5176                 -->
5177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5178                         <actions>
5179                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5180                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5181                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5182                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5183                         </actions>
5184                 </permacrud>
5185         </class>
5186
5187         <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">
5188                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
5189                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5190                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5191                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5192                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5193                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5194                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5195                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5196                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
5197                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5198                 </fields>
5199                 <links>
5200                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5201                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5202             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
5203             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
5204                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
5205                 </links>
5206         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5207             <actions>
5208                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5209                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
5210                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5211                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5212             </actions>
5213         </permacrud>
5214         </class>
5215
5216         <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">
5217                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
5218                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
5219                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
5220                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5221                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5222                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
5223                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
5224                 </fields>
5225                 <links>
5226                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5227                 </links>
5228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5229                         <actions>
5230                                 <create permission="ADMIN_FUNDING_SOURCE">
5231                     <context link="funding_source" field="owner"/>
5232                 </create>
5233                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
5234                     <context link="funding_source" field="owner"/>
5235                 </retrieve>
5236                                 <update permission="ADMIN_FUNDING_SOURCE">
5237                     <context link="funding_source" field="owner"/>
5238                 </update>
5239                                 <delete permission="ADMIN_FUNDING_SOURCE">
5240                     <context link="funding_source" field="owner"/>
5241                 </delete>
5242                         </actions>
5243                 </permacrud>
5244         </class>
5245
5246         <class id="acqofscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
5247                 <fields oils_persist:primary="id">
5248                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
5249                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
5250                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
5251                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
5252                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
5253                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5254                 </fields>
5255                 <links>
5256                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5257                 </links>
5258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5259                 </permacrud>
5260         </class>
5261
5262         <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">
5263                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
5264                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
5265                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5266                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
5267                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
5268                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5269                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
5270                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
5271                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5272                 </fields>
5273                 <links>
5274                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5275                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5276                 </links>
5277                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5278                         <actions>
5279                                 <create permission="ADMIN_ACQ_FUND">
5280                     <context link="fund" field="org"/>
5281                 </create>
5282                                 <retrieve permission="ADMIN_ACQ_FUND">
5283                     <context link="fund" field="org"/>
5284                 </retrieve>
5285                                 <update permission="ADMIN_ACQ_FUND">
5286                     <context link="fund" field="org"/>
5287                 </update>
5288                                 <delete permission="ADMIN_ACQ_FUND">
5289                     <context link="fund" field="org"/>
5290                 </delete>
5291                         </actions>
5292                 </permacrud>
5293         </class>
5294
5295         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
5296                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
5297                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5298                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5299                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5300                         <field reporter:label="Year" name="year" reporter:datatype="int" />
5301                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
5302                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5303                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
5304                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
5305                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5306                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
5307                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
5308                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5309                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5310                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
5311                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
5312                 </fields>
5313                 <links>
5314                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5315                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5316             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
5317             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
5318             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
5319                 </links>
5320         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5321             <actions>
5322                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
5323                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
5324                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
5325                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
5326             </actions>
5327         </permacrud>
5328         </class>
5329
5330         <class id="acqfat" controller="open-ils.cstore 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">
5331                 <fields oils_persist:primary="fund">
5332                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5333                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5334                 </fields>
5335                 <links>
5336                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5337                 </links>
5338         </class>
5339
5340         <class id="acqfdt" controller="open-ils.cstore 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">
5341                 <fields oils_persist:primary="fund">
5342                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5343                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
5344                 </fields>
5345                 <links>
5346                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5347                 </links>
5348         </class>
5349
5350         <class id="acqfet" controller="open-ils.cstore 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">
5351                 <fields oils_persist:primary="fund">
5352                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5353                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
5354                 </fields>
5355                 <links>
5356                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5357                 </links>
5358         </class>
5359
5360         <class id="acqfst" controller="open-ils.cstore 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">
5361                 <fields oils_persist:primary="fund">
5362                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5363                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5364                 </fields>
5365                 <links>
5366                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5367                 </links>
5368         </class>
5369
5370         <class id="acqfcb" controller="open-ils.cstore 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">
5371                 <fields oils_persist:primary="fund">
5372                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5373                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
5374                 </fields>
5375                 <links>
5376                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5377                 </links>
5378         </class>
5379
5380    <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">
5381         <fields oils_persist:primary="fund">
5382             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5383             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5384         </fields>
5385         <links>
5386             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5387         </links>
5388     </class>
5389
5390    <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">
5391         <fields oils_persist:primary="fund">
5392             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5393             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
5394         </fields>
5395         <links>
5396             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5397         </links>
5398     </class>
5399
5400    <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">
5401         <fields oils_persist:primary="fund">
5402             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5403             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5404         </fields>
5405         <links>
5406             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5407         </links>
5408     </class>
5409
5410    <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">
5411         <fields oils_persist:primary="fund">
5412             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5413             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
5414         </fields>
5415         <links>
5416             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5417         </links>
5418     </class>
5419
5420    <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">
5421         <fields oils_persist:primary="fund">
5422             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5423             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
5424         </fields>
5425         <links>
5426             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5427         </links>
5428     </class>
5429
5430         <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">
5431                 <fields oils_persist:primary="funding_source">
5432                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5433                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
5434                 </fields>
5435                 <links>
5436                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5437                 </links>
5438         </class>
5439
5440         <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">
5441                 <fields oils_persist:primary="funding_source">
5442                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5443                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
5444                 </fields>
5445                 <links>
5446                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5447                 </links>
5448         </class>
5449
5450         <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">
5451                 <fields oils_persist:primary="funding_source">
5452                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5453                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
5454                 </fields>
5455                 <links>
5456                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5457                 </links>
5458         </class>
5459
5460         <class id="acqfsb" controller="open-ils.cstore 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">
5461                 <fields oils_persist:primary="fund">
5462                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5463                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
5464                 </fields>
5465                 <links>
5466                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5467                 </links>
5468         </class>
5469
5470         <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">
5471                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
5472                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5473                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5474                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5475                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5476                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5477                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5478                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5479                 </fields>
5480                 <links>
5481                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5482                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5483                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5484                 </links>
5485                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5486                         <actions>
5487                                 <create permission="ADMIN_ACQ_FUND">
5488                     <context link="fund" field="org"/>
5489                 </create>
5490                                 <retrieve permission="ADMIN_ACQ_FUND">
5491                     <context link="fund" field="org"/>
5492                 </retrieve>
5493                                 <update permission="ADMIN_ACQ_FUND">
5494                     <context link="fund" field="org"/>
5495                 </update>
5496                                 <delete permission="ADMIN_ACQ_FUND">
5497                     <context link="fund" field="org"/>
5498                 </delete>
5499                         </actions>
5500                 </permacrud>
5501         </class>
5502
5503     <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">
5504         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
5505             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5506             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5507             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5508             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
5509             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
5510             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5511             <field reporter:label="Note" name="note" reporter:datatype="text" />
5512             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5513         </fields>
5514         <links>
5515             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5516             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5517             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5518         </links>
5519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5520                         <actions>
5521                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5522                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5523                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5524                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5525                         </actions>
5526                 </permacrud>
5527     </class>
5528
5529         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Pick List">
5530                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
5531                         <field reporter:label="Picklist ID" name="id" reporter:datatype="id" reporter:selector='name' />
5532                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5533                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
5534                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5535                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5536                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5537                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
5538                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
5539                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5540                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5541                 </fields>
5542                 <links>
5543                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5544                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5545                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5546                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5547                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
5548                 </links>
5549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5550                         <actions>
5551                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
5552                         </actions>
5553                 </permacrud>
5554         </class>
5555
5556         <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">
5557                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
5558                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5559                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
5560                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5561                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5562                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
5563                 </fields>
5564                 <links>
5565                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5566                 </links>
5567                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5568                         <actions>
5569                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5570                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
5571                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5572                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5573                         </actions>
5574                 </permacrud>
5575         </class>
5576
5577         <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">
5578                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
5579                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
5580                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5581                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5582                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5583                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5584                         <field reporter:label="State" name="state" reporter:datatype="text" />
5585                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
5586                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5587                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5588                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
5589                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5590                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5591                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5592                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
5593                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5594                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
5595                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
5596                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
5597                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
5598                 </fields>
5599                 <links>
5600                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5601                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5602                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5603                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
5604                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5605                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
5606                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
5607                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
5608                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5609                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5610                 </links>
5611                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5612                         <actions>
5613                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5614                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5615                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5616                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5617                         </actions>
5618                 </permacrud>
5619         </class>
5620
5621         <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">
5622                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
5623                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5624                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5625                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5626                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
5627                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
5628                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5629                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5630                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
5631                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5632                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5633                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5634                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5635                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
5636                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5637                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5638                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5639                 </fields>
5640                 <links>
5641                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
5642                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5643                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5644                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5645                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5646                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5647                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5648                 </links>
5649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5650             <actions>
5651                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5652             </actions>
5653                 </permacrud>
5654         </class>
5655
5656         <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">
5657                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
5658                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5659                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5660                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5661                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5662                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5663                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5664                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
5665                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
5666                 </fields>
5667                 <links>
5668                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5669                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5670                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5671                 </links>
5672                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5673             <actions>
5674                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5675                     <context link="purchase_order" field="ordering_agency"/>
5676                 </retrieve>
5677                 <create permission="CREATE_PURCHASE_ORDER">
5678                     <context link="purchase_order" field="ordering_agency"/>
5679                 </create>
5680                 <update permission="CREATE_PURCHASE_ORDER">
5681                     <context link="purchase_order" field="ordering_agency"/>
5682                 </update>
5683                 <delete permission="CREATE_PURCHASE_ORDER">
5684                     <context link="purchase_order" field="ordering_agency"/>
5685                 </delete>
5686             </actions>
5687                 </permacrud>
5688         </class>
5689
5690         <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">
5691                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
5692                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5693                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5694                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5695                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
5696                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5697                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
5698                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5699                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
5700                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
5701                 </fields>
5702                 <links>
5703                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5704                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5705                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5706                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5707                 </links>
5708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5709             <actions>
5710                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5711                     <context link="purchase_order" field="ordering_agency"/>
5712                 </retrieve>
5713                 <create permission="CREATE_PURCHASE_ORDER">
5714                     <context link="purchase_order" field="ordering_agency"/>
5715                 </create>
5716                 <update permission="CREATE_PURCHASE_ORDER">
5717                     <context link="purchase_order" field="ordering_agency"/>
5718                 </update>
5719                 <delete permission="CREATE_PURCHASE_ORDER">
5720                     <context link="purchase_order" field="ordering_agency"/>
5721                 </delete>
5722             </actions>
5723                 </permacrud>
5724         </class>
5725
5726         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
5727                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
5728                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
5729                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
5730                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link" />
5731                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5732                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5733                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5734                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5735                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
5736                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
5737                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
5738                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
5739                         <field reporter:label="State" name="state" reporter:datatype="text" />
5740                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5741                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5742                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
5743                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5744                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5745                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
5746                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
5747                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
5748                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
5749                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
5750                         <field reporter:label="Envoice Enties" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
5751                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
5752                 </fields>
5753                 <links>
5754                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5755                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5756                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5757                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5758                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5759                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5760                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5761                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
5762                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
5763                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
5764                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5765                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
5766                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
5767                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
5768                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
5769                 </links>
5770                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5771                         <actions>
5772                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
5773                                         <context link="purchase_order" field="ordering_agency"/>
5774                                         <context link="picklist" field="org_unit"/>
5775                                 </retrieve>
5776                         </actions>
5777                 </permacrud>
5778         </class>
5779
5780         <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">
5781                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
5782                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5783                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5784                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5785                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
5786                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5787                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5788                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
5789                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5790                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5791                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link"/>
5792                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
5793                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5794                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5795                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5796                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
5797                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
5798                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5799                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
5800                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5801                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5802                 </fields>
5803                 <links>
5804                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
5805                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5806                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5807                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5808                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5809                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5810                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5811                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5812                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5813                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
5814                 </links>
5815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5816                         <actions>
5817                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5818                                         <context link="purchase_order" field="ordering_agency"/>
5819                                         <context link="picklist" field="org_unit"/>
5820                                 </retrieve>
5821                         </actions>
5822                 </permacrud>
5823         </class>
5824
5825         <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">
5826                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
5827                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
5828                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
5829                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5830                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
5831                 </fields>
5832                 <links>
5833                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5834                 </links>
5835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5836                         <actions>
5837                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5838                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
5839                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5840                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5841                         </actions>
5842                 </permacrud>
5843         </class>
5844
5845         <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">
5846                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
5847                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
5848                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
5849                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5850                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5851                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5852                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5853                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5854                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
5855                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
5856                 </fields>
5857                 <links>
5858                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5859                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5860                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5861                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
5862                 </links>
5863         </class>
5864
5865         <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">
5866                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
5867                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
5868                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
5869                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
5870                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
5871                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
5872                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
5873                 </fields>
5874                 <links>
5875                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5876                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
5877                 </links>
5878         </class>
5879
5880         <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">
5881                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
5882                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
5883                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5884                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
5885                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
5886                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
5887                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
5888                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5889                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
5890                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
5891                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
5892                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
5893                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5894                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
5895                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5896                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
5897                 </fields>
5898                 <links>
5899                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5900                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
5901                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5902                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5903                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5904                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5905                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5906                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5907                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
5908                 </links>
5909         </class>
5910
5911         <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">
5912                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5913                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5914                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5915                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5916                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5917                 </fields>
5918                 <links/>
5919                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5920                         <actions>
5921                                 <retrieve />
5922                         </actions>
5923                 </permacrud>
5924         </class>
5925
5926         <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">
5927                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5928                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5929                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5930                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5931                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5932                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5933             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5934                 </fields>
5935                 <links/>
5936         <permacrud>
5937             <actions>
5938                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5939                 <retrieve />
5940                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5941                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5942             </actions>
5943         </permacrud>
5944         </class>
5945
5946         <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">
5947                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5948                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5949                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5950                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5951                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5952                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5953                 </fields>
5954                 <links/>
5955         </class>
5956         <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">
5957                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5958                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5959                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5960                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5961                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5962                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5963                 </fields>
5964                 <links>
5965                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5966                 </links>
5967         </class>
5968
5969         <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">
5970             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5971                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5972                 <field reporter:label="Code" name="code" reporter:datatype="text" />
5973                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5974                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5975                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5976                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5977         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5978
5979             </fields>
5980             <links>
5981                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5982             </links>
5983             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5984                 <actions>
5985                     <create permission="ADMIN_PROVIDER">
5986                         <context link="provider" field="owner"/>
5987                     </create>
5988                     <retrieve permission="ADMIN_PROVIDER">
5989                         <context link="provider" field="owner"/>
5990                     </retrieve>
5991                     <update permission="ADMIN_PROVIDER">
5992                         <context link="provider" field="owner"/>
5993                     </update>
5994                     <delete permission="ADMIN_PROVIDER">
5995                         <context link="provider" field="owner"/>
5996                     </delete>
5997                 </actions>
5998             </permacrud>
5999         </class>
6000         
6001         <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">
6002             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6003                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6004                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6005                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6006                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6007             </fields>
6008             <links>
6009                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6010             </links>
6011             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6012                 <actions>
6013                     <create permission="ADMIN_PROVIDER">
6014                         <context link="provider" field="owner"/>
6015                     </create>
6016                     <retrieve permission="ADMIN_PROVIDER">
6017                         <context link="provider" field="owner"/>
6018                     </retrieve>
6019                     <update permission="ADMIN_PROVIDER">
6020                         <context link="provider" field="owner"/>
6021                     </update>
6022                     <delete permission="ADMIN_PROVIDER">
6023                         <context link="provider" field="owner"/>
6024                     </delete>
6025                 </actions>
6026             </permacrud>
6027         </class>
6028         
6029         <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">
6030             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6031                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6032                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6033                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6034                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6035                 </fields>
6036                 <links/>
6037         </class>
6038
6039         <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">
6040                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6041                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6042                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6043                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6044                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6045                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6046                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6047                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6048                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6049                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6050                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6051                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6052                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6053                 </fields>
6054                 <links>
6055                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6056                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6057                 </links>
6058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6059             <actions>
6060                 <create permission="ADMIN_PROVIDER">
6061                     <context link="provider" field="owner"/>
6062                 </create>
6063                 <retrieve permission="ADMIN_PROVIDER">
6064                     <context link="provider" field="owner"/>
6065                 </retrieve>
6066                 <update permission="ADMIN_PROVIDER">
6067                     <context link="provider" field="owner"/>
6068                 </update>
6069                 <delete permission="ADMIN_PROVIDER">
6070                     <context link="provider" field="owner"/>
6071                 </delete>
6072             </actions>
6073         </permacrud>
6074         </class>
6075
6076         <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">
6077                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
6078                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
6079                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
6080                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
6081                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
6082                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
6083                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
6084                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
6085                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
6086                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
6087                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
6088                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
6089                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
6090                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
6091                 </fields>
6092                 <links>
6093                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
6094                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6095                 </links>
6096         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6097             <actions>
6098                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6099                     <context link="account" jump="provider" field="owner"/>
6100                 </retrieve>
6101                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6102                     <context link="account" jump="provider" field="owner"/>
6103                 </update>
6104                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6105                     <context link="account" jump="provider" field="owner"/>
6106                 </delete>
6107             </actions>
6108         </permacrud>
6109         </class>
6110
6111
6112         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
6113                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
6114                         <field name="id" reporter:datatype="id" />
6115                         <field name="parent" reporter:datatype="link"/>
6116                         <field name="owner" reporter:datatype="link"/>
6117                         <field name="create_time" reporter:datatype="timestamp"/>
6118                         <field name="name" reporter:datatype="text"/>
6119                         <field name="shared" reporter:datatype="bool"/>
6120                         <field name="share_with" reporter:datatype="link"/>
6121                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6122                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
6123                 </fields>
6124                 <links>
6125                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6126                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
6127                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
6128                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6129                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
6130                 </links>
6131         </class>
6132         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
6133                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
6134                         <field name="id" reporter:datatype="id" />
6135                         <field name="parent" reporter:datatype="link"/>
6136                         <field name="owner" reporter:datatype="link"/>
6137                         <field name="create_time" reporter:datatype="timestamp"/>
6138                         <field name="name" reporter:datatype="text"/>
6139                         <field name="shared" reporter:datatype="bool"/>
6140                         <field name="share_with" reporter:datatype="link"/>
6141                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6142                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
6143                 </fields>
6144                 <links>
6145                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6146                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
6147                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
6148                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6149                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
6150                 </links>
6151         </class>
6152         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
6153                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
6154                         <field name="id" reporter:datatype="id" />
6155                         <field name="parent" reporter:datatype="link"/>
6156                         <field name="owner" reporter:datatype="link"/>
6157                         <field name="create_time" reporter:datatype="timestamp"/>
6158                         <field name="name" reporter:datatype="text"/>
6159                         <field name="shared" reporter:datatype="bool"/>
6160                         <field name="share_with" reporter:datatype="link"/>
6161                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6162                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6163                 </fields>
6164                 <links>
6165                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6166                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
6167                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
6168                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6169                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
6170                 </links>
6171         </class>
6172         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
6173                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
6174                         <field name="id" reporter:datatype="id" />
6175                         <field name="owner" reporter:datatype="link"/>
6176                         <field name="create_time" reporter:datatype="timestamp"/>
6177                         <field name="name" reporter:datatype="text"/>
6178                         <field name="data" reporter:datatype="text"/>
6179                         <field name="folder" reporter:datatype="link"/>
6180                         <field name="description" reporter:datatype="text"/>
6181                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6182                 </fields>
6183                 <links>
6184                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6185                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
6186                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
6187                 </links>
6188         </class>
6189         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
6190                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
6191                         <field name="id" reporter:datatype="id" />
6192                         <field name="owner" reporter:datatype="link"/>
6193                         <field name="create_time" reporter:datatype="timestamp"/>
6194                         <field name="template" reporter:datatype="link"/>
6195                         <field name="data" reporter:datatype="link"/>
6196                         <field name="folder" reporter:datatype="link"/>
6197                         <field name="recur" reporter:datatype="bool"/>
6198                         <field name="recurrence" reporter:datatype="interval"/>
6199                         <field name="name" reporter:datatype="text"/>
6200                         <field name="description" reporter:datatype="text"/>
6201                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
6202                 </fields>
6203                 <links>
6204                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6205                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
6206                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
6207                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
6208                 </links>
6209         </class>
6210         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
6211                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
6212                         <field name="id" reporter:datatype="id" />
6213                         <field name="runner" reporter:datatype="link"/>
6214                         <field name="start_time" reporter:datatype="timestamp"/>
6215                         <field name="complete_time" reporter:datatype="timestamp"/>
6216                         <field name="run_time" reporter:datatype="timestamp"/>
6217                         <field name="email" reporter:datatype="text"/>
6218                         <field name="excel_format" reporter:datatype="bool"/>
6219                         <field name="csv_format" reporter:datatype="bool"/>
6220                         <field name="html_format" reporter:datatype="bool"/>
6221                         <field name="error_code" reporter:datatype="int"/>
6222                         <field name="error_text" reporter:datatype="text"/>
6223                         <field name="report" reporter:datatype="link"/>
6224                         <field name="folder" reporter:datatype="link"/>
6225                         <field name="chart_pie" reporter:datatype="bool"/>
6226                         <field name="chart_bar" reporter:datatype="bool"/>
6227                         <field name="chart_line" reporter:datatype="bool"/>
6228                 </fields>
6229                 <links>
6230                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
6231                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
6232                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
6233                 </links>
6234         </class>
6235         <class id="rmsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
6236                 <fields oils_persist:primary="id">
6237                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6238                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6239                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6240                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6241                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6242                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6243                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6244                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6245                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6246                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6247                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6248                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6249                 </fields>
6250                 <links>
6251                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6252                 </links>
6253         </class>
6254         <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">
6255                 <fields oils_persist:primary="id">
6256                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6257                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6258                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6259                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6260                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6261                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6262                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6263                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6264                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6265                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6266                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6267                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6268                 </fields>
6269                 <links>
6270                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6271                 </links>
6272         </class>
6273         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
6274                 <fields oils_persist:primary="id">
6275                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6276                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
6277                         <field reporter:label="Fingerprint" name="fingerprint" />
6278                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6279                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6280                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6281                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6282                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
6283                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6284                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6285                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6286                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
6287                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
6288                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
6289                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6290                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6291                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
6292                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
6293                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
6294                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
6295                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
6296                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
6297                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6298                 </fields>
6299                 <links>
6300                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
6301                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6302                 </links>
6303         </class>
6304         <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">
6305                 <fields oils_persist:primary="id">
6306                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
6307                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
6308                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
6309                 </fields>
6310                 <links>
6311                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
6312                 </links>
6313         </class>
6314         <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">
6315                 <fields oils_persist:primary="id">
6316                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
6317                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
6318                 </fields>
6319                 <links>
6320                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
6321                 </links>
6322         </class>
6323         <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">
6324                 <fields oils_persist:primary="id">
6325                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6326                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
6327                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
6328                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
6329                 </fields>
6330                 <links>
6331                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
6332                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
6333                 </links>
6334         </class>
6335         <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">
6336                 <fields oils_persist:primary="xact">
6337                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6338                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
6339                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
6340                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
6341                 </fields>
6342                 <links>
6343                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6344                 </links>
6345         </class>
6346         <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">
6347                 <fields oils_persist:primary="xact">
6348                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6349                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
6350                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
6351                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
6352                 </fields>
6353                 <links>
6354                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6355                 </links>
6356         </class>
6357         <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)">
6358                 <fields oils_persist:primary="id">
6359                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
6360                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
6361                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
6362                 </fields>
6363                 <links>
6364                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6365                 </links>
6366         </class>
6367         <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">
6368                 <fields oils_persist:primary="id">
6369                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
6370                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
6371                 </fields>
6372                 <links>
6373                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
6374                 </links>
6375         </class>
6376         <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">
6377                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
6378                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
6379                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
6380                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
6381                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
6382                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6383                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
6384                 </fields>
6385                 <links>
6386                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6387                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
6388                 </links>
6389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6390                         <actions>
6391                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6392                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6393                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6394                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6395                         </actions>
6396                 </permacrud>
6397         </class>
6398         <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">
6399                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
6400                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
6401                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
6402                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
6403                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
6404                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6405                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6406                 </fields>
6407                 <links>
6408                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6409                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6410                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6411                 </links>
6412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6413                         <actions>
6414                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
6415                                         <context link="formula" field="owner"/>
6416                                 </create>
6417                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
6418                                         <context link="formula" field="owner"/>
6419                                 </retrieve>
6420                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
6421                                         <context link="formula" field="owner"/>
6422                                 </update>
6423                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
6424                                         <context link="formula" field="owner"/>
6425                                 </delete>
6426                         </actions>
6427                 </permacrud>
6428         </class>
6429
6430         <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">
6431                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
6432                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6433                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6434                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6435                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
6436                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
6437                 </fields>
6438                 <links>
6439                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6440                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6441                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6442                 </links>
6443                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6444                         <actions>
6445                                 <create permission="CREATE_PURCHASE_ORDER">
6446                                         <context link="formula" field="owner"/>
6447                 </create>
6448                                 <retrieve permission="CREATE_PURCHASE_ORDER">
6449                                         <context link="formula" field="owner"/>
6450                 </retrieve>
6451                                 <update permission="CREATE_PURCHASE_ORDER">
6452                                         <context link="formula" field="owner"/>
6453                 </update>
6454                                 <delete permission="CREATE_PURCHASE_ORDER">
6455                                         <context link="formula" field="owner"/>
6456                 </delete>
6457                         </actions>
6458                 </permacrud>
6459         </class>
6460
6461         <class id="acqda" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
6462                 <fields oils_persist:primary="id">
6463                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
6464                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6465                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
6466                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
6467                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
6468                 </fields>
6469                 <links>
6470                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6471                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6472                 </links>
6473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6474                 </permacrud>
6475         </class>
6476
6477         <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">
6478                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
6479                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
6480                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6481                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6482                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6483                 </fields>
6484                 <links>
6485                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6486                 </links>
6487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6488                         <actions>
6489                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6490                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
6491                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6492                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6493                         </actions>
6494                 </permacrud>
6495         </class>
6496
6497         <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">
6498                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
6499                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
6500                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6501                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6502                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6503                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
6504                 </fields>
6505                 <links>
6506                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6507                 </links>
6508                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6509                         <actions>
6510                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6511                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
6512                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6513                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6514                         </actions>
6515                 </permacrud>
6516         </class>
6517
6518         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
6519                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
6520                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
6521                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
6522                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
6523                 </fields>
6524                 <links>
6525                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
6526                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
6527                 </links>
6528                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6529                 </permacrud>
6530         </class>
6531
6532         <class id="acqcle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
6533                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
6534                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
6535                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
6536                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
6537                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
6538                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6539                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6540                 </fields>
6541                 <links>
6542                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
6543                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
6544                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6545                 </links>
6546                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6547                 </permacrud>
6548         </class>
6549
6550         <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">
6551                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
6552                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6553                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6554                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
6555                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6556                 </fields>
6557                 <links>
6558                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6559                 </links>
6560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6561             <actions>
6562                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6563                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
6564                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6565                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6566             </actions>
6567                 </permacrud>
6568         </class>
6569
6570         <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">
6571                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
6572                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
6573                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
6574                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
6575                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
6576                 </fields>
6577                 <links>
6578                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6579                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
6580                 </links>
6581                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6582                         <actions>
6583                                 <create permission="ADMIN_CLAIM_POLICY">
6584                                         <context link="claim_policy" field="org_unit"/>
6585                 </create>
6586                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
6587                                         <context link="claim_policy" field="org_unit"/>
6588                 </retrieve>
6589                                 <update permission="ADMIN_CLAIM_POLICY">
6590                                         <context link="claim_policy" field="org_unit"/>
6591                 </update>
6592                                 <delete permission="ADMIN_CLAIM_POLICY">
6593                                         <context link="claim_policy" field="org_unit"/>
6594                 </delete>
6595                         </actions>
6596                 </permacrud>
6597         </class>
6598
6599     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
6600         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
6601             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6602             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6603             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6604             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
6605             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6606             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
6607             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
6608             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
6609             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
6610             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
6611             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
6612             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
6613             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
6614             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
6615             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6616         </fields>
6617     </class>
6618
6619     <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">
6620         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
6621             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6622             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6623             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6624             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6625             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6626         </fields>
6627     </class>
6628
6629     <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">
6630         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
6631             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6632             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6633             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6634             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6635             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6636             <field reporter:label="City" name="city" reporter:datatype="text"/>
6637             <field reporter:label="State" name="state" reporter:datatype="text"/>
6638             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6639             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6640             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6641         </fields>
6642     </class>
6643
6644     <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">
6645         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
6646             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6647             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6648             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6649             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6650             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6651             <field reporter:label="City" name="city" reporter:datatype="text"/>
6652             <field reporter:label="State" name="state" reporter:datatype="text"/>
6653             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6654             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6655             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6656         </fields>
6657     </class>
6658
6659     <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">
6660         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
6661             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6662             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6663             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6664             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
6665             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
6666             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6667         </fields>
6668     </class>
6669
6670     <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">
6671         <fields>
6672             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6673             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6674             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6675         </fields>
6676                 <links>
6677                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6678                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6679                 </links>
6680     </class>
6681
6682     <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">
6683         <fields>
6684             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6685             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
6686         </fields>
6687                 <links>
6688                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6689                 </links>
6690     </class>
6691
6692     <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">
6693         <fields>
6694             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6695             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6696             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6697         </fields>
6698                 <links>
6699                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6700                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6701                 </links>
6702     </class>
6703
6704     <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">
6705         <fields>
6706             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6707             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
6708         </fields>
6709                 <links>
6710                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6711                 </links>
6712     </class>
6713
6714     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
6715                 <oils_persist:source_definition>
6716
6717             SELECT  DISTINCT l.*
6718               FROM  action.unfulfilled_hold_loops l
6719                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
6720               WHERE l.count = m.max
6721
6722                 </oils_persist:source_definition>
6723         <fields>
6724             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6725             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6726             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6727         </fields>
6728                 <links>
6729                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6730                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6731                 </links>
6732     </class>
6733
6734         <class id="qsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
6735                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
6736                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
6737                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
6738                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
6739                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
6740                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="int"/>
6741                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="int"/>
6742                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="int"/>
6743                 </fields>
6744                 <links>
6745                 </links>
6746                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6747                 </permacrud>
6748         </class>
6749
6750         <class id="qseq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
6751                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
6752                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
6753                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
6754                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6755                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
6756                 </fields>
6757                 <links>
6758                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
6759                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
6760                 </links>
6761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6762                 </permacrud>
6763         </class>
6764
6765         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
6766                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
6767                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
6768                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
6769                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
6770                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
6771                 </fields>
6772                 <links>
6773                 </links>
6774                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6775                 </permacrud>
6776         </class>
6777
6778         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
6779                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
6780                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
6781                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
6782                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6783                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
6784                 </fields>
6785                 <links>
6786                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
6787                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
6788                 </links>
6789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6790                 </permacrud>
6791         </class>
6792         
6793         <class id="qfs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
6794                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
6795                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
6796                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
6797                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
6798                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
6799                 </fields>
6800                 <links>
6801                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
6802                 </links>
6803                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6804                 </permacrud>
6805         </class>
6806         
6807         <class id="qfpd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
6808                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
6809                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
6810                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6811                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6812                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
6813                 </fields>
6814                 <links>
6815                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6816                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
6817                 </links>
6818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6819                 </permacrud>
6820         </class>
6821
6822         <class id="qbv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
6823                 <fields oils_persist:primary="name">
6824                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
6825                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6826                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
6827                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6828                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
6829                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
6830                 </fields>
6831                 <links>
6832                 </links>
6833                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6834                 </permacrud>
6835         </class>
6836
6837         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
6838                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6839                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6840                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
6841                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6842                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6843                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6844                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6845                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6846                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6847                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6848                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6849                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6850                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6851                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6852                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
6853                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
6854                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
6855                 </fields>
6856                 <links>
6857                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6858                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
6859                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
6860                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6861                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
6862                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
6863                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
6864                 </links>
6865                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6866                 </permacrud>
6867         </class>
6868
6869         <class id="qcb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
6870                 <fields oils_persist:primary="id" oils_persist:sequence="case_branch_id_seq">
6871                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
6872                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6873                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6874                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
6875                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
6876                 </fields>
6877                 <links>
6878                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6879                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
6880                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
6881                 </links>
6882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6883                 </permacrud>
6884         </class>
6885
6886         <class id="qfr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
6887                 <fields oils_persist:primary="id" oils_persist:sequence="from_relation_id_seq">
6888                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
6889                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
6890                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
6891                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
6892                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
6893                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
6894                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6895                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
6896                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6897                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
6898                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
6899                 </fields>
6900                 <links>
6901                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
6902                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
6903                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
6904                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
6905                 </links>
6906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6907                 </permacrud>
6908         </class>
6909
6910         <class id="qrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
6911                 <fields oils_persist:primary="id" oils_persist:sequence="record_column_id_seq">
6912                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
6913                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
6914                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6915                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6916                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
6917                 </fields>
6918                 <links>
6919                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
6920                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
6921                 </links>
6922                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6923                 </permacrud>
6924         </class>
6925
6926         <class id="qsi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
6927                 <fields oils_persist:primary="id" oils_persist:sequence="select_item_id_seq">
6928                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
6929                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
6930                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6931                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
6932                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
6933                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
6934                 </fields>
6935                 <links>
6936                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6937                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
6938                 </links>
6939                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6940                 </permacrud>
6941         </class>
6942
6943         <class id="qobi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
6944                 <fields oils_persist:primary="id" oils_persist:sequence="order_by_item_id_seq">
6945                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
6946                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
6947                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6948                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
6949                 </fields>
6950                 <links>
6951                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6952                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
6953                 </links>
6954                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6955                 </permacrud>
6956         </class>
6957
6958         <class id="xbet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
6959                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6960                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6961                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6962                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6963                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6964                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
6965                 </fields>
6966                 <links>
6967                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6968                 </links>
6969                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6970                 </permacrud>
6971         </class>
6972
6973         <class id="xbind" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
6974                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6975                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6976                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6977                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6978                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6979                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
6980                 </fields>
6981                 <links>
6982                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6983                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
6984                 </links>
6985                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6986                 </permacrud>
6987         </class>
6988
6989         <class id="xbool" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
6990                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6991                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6992                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6993                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6994                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6995                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6996                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
6997                 </fields>
6998                 <links>
6999                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7000                 </links>
7001                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7002                 </permacrud>
7003         </class>
7004
7005         <class id="xcase" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
7006                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7007                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7008                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7009                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7010                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7011                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7012                 </fields>
7013                 <links>
7014                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7015                 </links>
7016                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7017                 </permacrud>
7018         </class>
7019
7020         <class id="xcast" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
7021                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7022                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7023                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7024                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7025                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7026                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7027                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7028                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7029                 </fields>
7030                 <links>
7031                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7032                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7033                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7034                 </links>
7035                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7036                 </permacrud>
7037         </class>
7038
7039         <class id="xcol" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
7040                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7041                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7042                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7043                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7044                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7045                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7046                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7047                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7048                 </fields>
7049                 <links>
7050                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7051                 </links>
7052                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7053                 </permacrud>
7054         </class>
7055
7056         <class id="xex" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
7057                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7058                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7059                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7060                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7061                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7062                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7063                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7064                 </fields>
7065                 <links>
7066                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7067                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7068                 </links>
7069                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7070                 </permacrud>
7071         </class>
7072
7073         <class id="xfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xfld" oils_persist:tablename="query.expr_xfld" reporter:label="Field Expression">
7074                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7075                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7076                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7077                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7078                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7079                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7080                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7081                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7082                 </fields>
7083                 <links>
7084                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7085                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7086                 </links>
7087                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7088                 </permacrud>
7089         </class>
7090
7091         <class id="xfunc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
7092                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7093                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7094                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7095                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7096                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7097                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7098                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7099                 </fields>
7100                 <links>
7101                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7102                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7103                 </links>
7104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7105                 </permacrud>
7106         </class>
7107
7108         <class id="xin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
7109                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7110                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7111                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7112                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7113                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7114                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7115                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7116                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7117                 </fields>
7118                 <links>
7119                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7120                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7121                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7122                 </links>
7123                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7124                 </permacrud>
7125         </class>
7126
7127         <class id="xisnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
7128                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7129                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7130                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7131                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7132                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7133                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7134                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7135                 </fields>
7136                 <links>
7137                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7138                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7139                 </links>
7140                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7141                 </permacrud>
7142         </class>
7143
7144         <class id="xnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
7145                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7146                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7147                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7148                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7149                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7150                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7151                 </fields>
7152                 <links>
7153                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7154                 </links>
7155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7156                 </permacrud>
7157         </class>
7158
7159         <class id="xnum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
7160                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7161                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7162                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7163                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7164                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7165                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7166                 </fields>
7167                 <links>
7168                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7169                 </links>
7170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7171                 </permacrud>
7172         </class>
7173
7174         <class id="xop" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
7175                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7176                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7177                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7178                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7179                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7180                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7181                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7182                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7183                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7184                 </fields>
7185                 <links>
7186                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7187                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7188                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7189                 </links>
7190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7191                 </permacrud>
7192         </class>
7193
7194         <class id="xser" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
7195                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7196                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7197                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7198                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7199                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7200                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7201                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7202                 </fields>
7203                 <links>
7204                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7205                 </links>
7206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7207                 </permacrud>
7208         </class>
7209
7210         <class id="xstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
7211                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7212                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7213                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7214                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7215                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7216                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7217                 </fields>
7218                 <links>
7219                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7220                 </links>
7221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7222                 </permacrud>
7223         </class>
7224
7225         <class id="xsubq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
7226                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7227                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7228                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7229                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7230                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7231                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7232                 </fields>
7233                 <links>
7234                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7235                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7236                 </links>
7237                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7238                 </permacrud>
7239         </class>
7240
7241         <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">
7242                 <fields oils_persist:primary="id">
7243                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
7244                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
7245                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
7246                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
7247                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
7248                 </fields>
7249                 <links>
7250                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
7251                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7252                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
7253                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7254                 </links>
7255         </class>
7256
7257         <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">
7258                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
7259                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7260                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
7261                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
7262                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
7263                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7264                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7265                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
7266                 </fields>
7267                 <links/>
7268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7269                         <actions>
7270                                 <retrieve/>
7271                         </actions>
7272                 </permacrud>
7273         </class>
7274
7275         <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">
7276                 <fields oils_persist:primary="ptype_key">
7277                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
7278                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7279                 </fields>
7280                 <links/>
7281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7282                         <actions>
7283                                 <retrieve/>
7284                         </actions>
7285                 </permacrud>
7286         </class>
7287
7288         <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">
7289                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
7290                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7291                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
7292                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
7293                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7294                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7295                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7296                 </fields>
7297                 <links>
7298                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
7299                 </links>
7300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7301                         <actions>
7302                                 <retrieve/>
7303                         </actions>
7304                 </permacrud>
7305         </class>
7306
7307         <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">
7308                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
7309                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7310                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
7311                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
7312                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7313                 </fields>
7314                 <links>
7315                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7316                 </links>
7317                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7318                         <actions>
7319                                 <retrieve/>
7320                         </actions>
7321                 </permacrud>
7322         </class>
7323
7324         <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">
7325                 <fields oils_persist:primary="code">
7326                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
7327                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
7328                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
7329                 </fields>
7330                 <links/>
7331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7332                         <actions>
7333                                 <retrieve/>
7334                         </actions>
7335                 </permacrud>
7336         </class>
7337
7338         <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">
7339                 <oils_persist:source_definition>
7340
7341             SELECT  b.id,
7342                     MAX(dcp.edit_date) AS last_delete_date
7343              FROM   biblio.record_entry b
7344                     JOIN asset.call_number cn ON (cn.record = b.id)
7345                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
7346              WHERE  NOT b.deleted
7347              GROUP BY b.id
7348              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
7349
7350                 </oils_persist:source_definition>
7351                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
7352                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
7353                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
7354                 </fields>
7355                 <links>
7356                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7357                 </links>
7358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7359                         <actions>
7360                                 <retrieve/>
7361                         </actions>
7362                 </permacrud>
7363         </class>
7364
7365         <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">
7366                 <oils_persist:source_definition>
7367
7368             -- -- 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.
7369             -- -- 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
7370             -- -- may not.
7371             -- SELECT
7372             --     bre.id AS "bib_id",
7373             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
7374             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
7375             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
7376             -- FROM (
7377                 SELECT
7378                     y.bre AS "id",
7379                     COALESCE( x.copy_count, 0 ) AS "copy_count",
7380                     y.hold_count AS "hold_count",
7381                     (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"
7382                 FROM (
7383                         SELECT
7384                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
7385                             COUNT(*) AS "hold_count"
7386                         FROM action.hold_request h
7387                         WHERE
7388                             cancel_time IS NULL
7389                             AND fulfillment_time IS NULL
7390                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
7391                         GROUP BY 1
7392                     )y LEFT JOIN (
7393                         SELECT 
7394                             (SELECT id
7395                                 FROM biblio.record_entry 
7396                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
7397                             ) AS "bre", 
7398                             COUNT(*) AS "copy_count"
7399                         FROM asset.copy
7400                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
7401                         WHERE copy.holdable 
7402                             AND NOT copy.deleted 
7403                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
7404                         GROUP BY 1
7405                     )x ON x.bre = y.bre
7406                 -- )z RIGHT JOIN (
7407                 --     SELECT id
7408                 --     FROM biblio.record_entry
7409                 --     WHERE NOT deleted
7410                 -- )bre ON (z.bib_id = bre.id)
7411                 
7412
7413                 </oils_persist:source_definition>
7414                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
7415                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
7416                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
7417                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
7418                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
7419                 </fields>
7420                 <links>
7421                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7422                 </links>
7423                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7424                         <actions>
7425                                 <retrieve/>
7426                         </actions>
7427                 </permacrud>
7428         </class>
7429
7430         <!-- ********************************************************************************************************************* -->
7431         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
7432         <!-- ********************************************************************************************************************* -->
7433         <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">
7434                 <fields oils_persist:primary="id">
7435                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
7436                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
7437                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
7438                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7439                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
7440                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
7441                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
7442                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
7443                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
7444                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
7445                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
7446                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
7447                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
7448                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
7449                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
7450                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
7451                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
7452                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
7453                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
7454                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
7455                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
7456                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
7457                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
7458                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
7459                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
7460                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
7461                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
7462                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
7463                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
7464                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
7465                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
7466                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
7467                 </fields>
7468                 <links>
7469                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7470                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
7471                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
7472                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
7473                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7474                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
7475                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
7476                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
7477                 </links>
7478         </class>
7479
7480         <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">
7481                 <fields oils_persist:primary="id">
7482                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7483                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7484                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7485                 </fields>
7486                 <links>
7487                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7488                 </links>
7489         </class>
7490
7491         <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">
7492                 <fields oils_persist:primary="id">
7493                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7494                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7495                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7496                 </fields>
7497                 <links>
7498                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7499                 </links>
7500         </class>
7501
7502         <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">
7503                 <fields oils_persist:primary="id">
7504                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7505
7506                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
7507                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
7508                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
7509
7510                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
7511                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
7512                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
7513
7514                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
7515                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
7516
7517                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7518                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7519                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
7520
7521                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
7522                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
7523
7524                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
7525                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
7526                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
7527
7528                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
7529                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
7530                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
7531
7532                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
7533                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
7534                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
7535                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
7536
7537                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
7538                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
7539
7540                 </fields>
7541                 <links>
7542                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
7543                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7544                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7545                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7546                 </links>
7547         </class>
7548
7549         <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">
7550                 <oils_persist:source_definition>
7551
7552             SELECT
7553                 po.ordering_agency AS ordering_agency,
7554                 po.id AS purchase_order,
7555                 li.id AS lineitem,
7556                 lid.id AS lineitem_detail,
7557                 cpa.id AS claim_policy_action
7558             FROM
7559                 acq.lineitem_detail lid
7560                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
7561                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
7562                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
7563                 JOIN acq.claim_policy_action cpa ON (
7564                     cpa.claim_policy = cp.id
7565
7566                     -- we only care about claim policy actions whose claim
7567                     -- interval we'd reached or exceeded
7568                     AND (NOW() - cpa.action_interval) &gt; po.order_date
7569
7570                     -- filter out all claim policy actions where claim events
7571                     -- have occurred on or after the action's action_interval
7572                     AND NOT EXISTS (
7573                         SELECT 1
7574                         FROM
7575                             acq.claim_event evt
7576                             JOIN acq.claim claim ON (
7577                                 claim.id = evt.claim
7578                                 AND claim.lineitem_detail = lid.id
7579                             )
7580                         WHERE
7581                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
7582                     )
7583                 )
7584             WHERE
7585                 lid.cancel_reason IS NULL
7586                 AND li.cancel_reason IS NULL -- belt/suspenders
7587                 AND po.cancel_reason IS NULL -- belt/suspenders
7588                 AND lid.recv_time IS NULL
7589                 AND po.state = 'on-order'
7590             ORDER BY 1, 2, 3, 4, 5
7591
7592                 </oils_persist:source_definition>
7593                 <fields>
7594                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7595                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7596                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7597                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7598                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
7599                 </fields>
7600                 <links>
7601                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7602                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7603                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7604                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7605                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
7606                 </links>
7607         </class>
7608
7609         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
7610                 <oils_persist:source_definition>
7611
7612             SELECT 
7613                 li.id AS lineitem, 
7614                 (
7615                     SELECT COUNT(lid.id) 
7616                     FROM acq.lineitem_detail lid
7617                     WHERE lineitem = li.id
7618                 ) AS item_count,
7619                 (
7620                     SELECT COUNT(lid.id) 
7621                     FROM acq.lineitem_detail lid
7622                     WHERE recv_time IS NOT NULL AND lineitem = li.id
7623                 ) AS recv_count,
7624                 (
7625                     SELECT COUNT(lid.id) 
7626                     FROM acq.lineitem_detail lid
7627                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
7628                 ) AS cancel_count,
7629                 (
7630                     SELECT COUNT(lid.id) 
7631                     FROM acq.lineitem_detail lid
7632                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
7633                     WHERE NOT debit.encumbrance AND lineitem = li.id
7634                 ) AS invoice_count,
7635                 (
7636                     SELECT COUNT(DISTINCT(lid.id)) 
7637                     FROM acq.lineitem_detail lid
7638                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
7639                     WHERE lineitem = li.id
7640                 ) AS claim_count,
7641                 (
7642                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
7643                     FROM acq.lineitem_detail lid
7644                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
7645                 ) AS estimated_amount,
7646                 (
7647                     SELECT SUM(debit.amount)::NUMERIC(8,2)
7648                     FROM acq.lineitem_detail lid
7649                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
7650                     WHERE debit.encumbrance AND lineitem = li.id
7651                 ) AS encumbrance_amount,
7652                 (
7653                     SELECT SUM(debit.amount)::NUMERIC(8,2)
7654                     FROM acq.lineitem_detail lid
7655                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
7656                     WHERE NOT debit.encumbrance AND lineitem = li.id
7657                 ) AS paid_amount
7658
7659                 FROM acq.lineitem AS li
7660         </oils_persist:source_definition>
7661                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
7662                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7663                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7664                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
7665                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
7666                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
7667                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
7668                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
7669                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
7670                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
7671                 </fields>
7672                 <links>
7673                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7674                 </links>
7675     </class>
7676
7677
7678         <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">
7679                 <oils_persist:source_definition>
7680
7681                         SELECT  t.*
7682                           FROM  action.transit_copy t
7683                                 JOIN actor.org_unit AS s ON (t.source = s.id)
7684                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
7685                           WHERE s.parent_ou &lt;&gt; d.parent_ou
7686
7687                 </oils_persist:source_definition>
7688                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7689                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
7690                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
7691                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7692                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
7693                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
7694                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
7695                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
7696                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7697                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7698                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7699                 </fields>
7700                 <links>
7701                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
7702                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7703                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7704                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7705                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7706                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
7707                 </links>
7708         </class>
7709
7710     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
7711                 <oils_persist:source_definition>
7712
7713         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
7714                 SELECT
7715                         cp.id as copy,
7716                         COUNT(circ.id),
7717                         EXTRACT(YEAR FROM circ.xact_start) AS year,
7718                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
7719                 FROM
7720                         asset.copy cp
7721                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
7722                 GROUP BY 1, 3, 4
7723                 UNION
7724                 SELECT
7725                         cp.id as copy,
7726                         COUNT(circ.id),
7727                         EXTRACT(YEAR FROM circ.xact_start) AS year,
7728                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
7729                 FROM
7730                         asset.copy cp
7731                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
7732                 GROUP BY 1, 3, 4
7733                 UNION
7734                 SELECT
7735                         id as copy,
7736                         circ_count,
7737                         -1 AS year,
7738                         false as is_renewal
7739                 FROM
7740                         extend_reporter.legacy_circ_count
7741         )x GROUP BY 1, 3, 4
7742
7743                 </oils_persist:source_definition>
7744         <fields>
7745             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
7746             <field reporter:label="Count" name="count" reporter:datatype="int"/>
7747             <field reporter:label="Year" name="year" reporter:datatype="int"/>
7748             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
7749         </fields>
7750                 <links>
7751                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7752                 </links>
7753                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7754                         <actions>
7755                                 <retrieve/>
7756                         </actions>
7757                 </permacrud>
7758     </class>
7759
7760         <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">
7761                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7762                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
7763                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
7764                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
7765                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7766                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
7767                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
7768                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
7769                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
7770                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
7771                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
7772                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
7773                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
7774                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
7775                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
7776                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
7777                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
7778                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
7779                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
7780                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
7781                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
7782                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
7783                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
7784                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
7785                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
7786                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7787                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7788                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7789                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
7790                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
7791                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
7792                 </fields>
7793                 <links>
7794                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7795                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
7796                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
7797                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7798                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
7799                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7800                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7801                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7802                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7803                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7804                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7805                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7806                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
7807                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7808                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7809                 </links>
7810         </class>
7811
7812     <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">
7813         <fields oils_persist:primary="id">
7814             <field reporter:label="Title" name="title" reporter:datatype="text"/>
7815             <field reporter:label="Author" name="author" reporter:datatype="text"/>
7816             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
7817             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7818             <field reporter:label="Price" name="price" reporter:datatype="money"/>
7819             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7820             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
7821             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
7822             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
7823             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
7824             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
7825             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
7826             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
7827             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
7828             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
7829             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
7830             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7831             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7832             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
7833             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
7834             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
7835             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
7836             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7837             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
7838             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7839             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
7840             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
7841             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
7842             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
7843             <field reporter:label="Status" name="status" reporter:datatype="link"/>
7844             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
7845             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
7846             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
7847             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
7848         </fields>
7849         <links>
7850             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7851             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7852             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7853             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7854             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7855         </links>
7856     </class>
7857
7858     <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">
7859         <fields oils_persist:primary="id">
7860             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7861             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7862             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7863             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7864         </fields>
7865         <links>
7866             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7867             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7868         </links>
7869     </class>
7870
7871     <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">
7872         <fields oils_persist:primary="owning_lib">
7873             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7874             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7875             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7876         </fields>
7877         <links>
7878             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7879         </links>
7880     </class>
7881
7882     <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">
7883         <fields oils_persist:primary="id">
7884             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7885             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7886             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7887             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7888             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7889         </fields>
7890         <links>
7891             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7892             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7893             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7894         </links>
7895     </class>
7896
7897     <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">
7898         <fields oils_persist:primary="circ_lib">
7899             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7900             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7901             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7902             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7903         </fields>
7904         <links>
7905             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7906             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7907         </links>
7908     </class>
7909
7910     <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">
7911         <fields oils_persist:primary="id">
7912             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7913             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7914             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7915             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7916             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7917         </fields>
7918         <links>
7919             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7920             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7921             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7922         </links>
7923     </class>
7924
7925     <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">
7926         <fields oils_persist:primary="home_ou">
7927             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7928             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7929             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7930             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7931         </fields>
7932         <links>
7933             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7934             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7935         </links>
7936     </class>
7937         <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">
7938                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
7939                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
7940                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
7941                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
7942                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7943                 </fields>
7944                 <links>
7945                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7946                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
7947                 </links>
7948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7949                         <actions>
7950                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7951                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
7952                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7953                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7954                         </actions>
7955                 </permacrud>
7956         </class>
7957         <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">
7958                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
7959                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
7960                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
7961                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
7962                 </fields>
7963                 <links>
7964                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7965                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
7966                         </links>
7967                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7968                 <actions>
7969                                 <create permission="ADMIN_ACQ_FUND_TAG">
7970                                         <context link="tag" field="owner"/>
7971                                 </create>
7972                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7973                                         <context link="tag" field="owner"/>
7974                                 </retrieve>
7975                                 <update permission="ADMIN_ACQ_FUND_TAG">
7976                                         <context link="tag" field="owner"/>
7977                                 </update>
7978                                 <delete permission="ADMIN_ACQ_FUND_TAG">
7979                                         <context link="tag" field="owner"/>
7980                                 </delete>
7981                         </actions>
7982                 </permacrud>
7983         </class>
7984
7985         <!-- ********************************************************************************************************************* -->
7986
7987 </IDL>
7988
7989 <!--
7990     vim:noet:ts=4:sw=4:
7991 -->