]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
stumbled upon an incorrect sequence
[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                 <!--
330                                 <retrieve permission="CREATE_BIB_IMPORT_IMPORT_FIELD_DEF UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
331                 -->
332                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
333                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
334                         </actions>
335                 </permacrud>
336         </class>
337
338         <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">
339                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
340                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
341                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
342                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
343                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
344                 </fields>
345                 <links>
346                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
347                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
348                 </links>
349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
350                         <actions>
351                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
352                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
353                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
354                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
355                         </actions>
356                 </permacrud>
357         </class>
358
359         <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">
360                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
361                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
362                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
363                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
364                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
365                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
366                 </fields>
367                 <links>
368                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
369                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
370                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
371                 </links>
372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
373                         <actions>
374                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
375                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
376                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
377                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
378                         </actions>
379                 </permacrud>
380         </class>
381
382         <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">
383                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
384                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
385                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
386                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
387                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
388                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
389                 </fields>
390                 <links>
391                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
392                 </links>
393                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
394                         <actions>
395                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
396                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
397                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
398                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
399                         </actions>
400                 </permacrud>
401         </class>
402
403         <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">
404                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
405                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
406                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
407                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
408                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
409                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
410                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
411                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
412                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
413                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
414                 </fields>
415                 <links>
416                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
417                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
418             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
419             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
420                 </links>
421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
422                         <actions>
423                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
424                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
425                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
426                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
427                         </actions>
428                 </permacrud>
429         </class>
430
431         <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">
432                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
433                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
434                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
435                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
436                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
437                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
438                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
439                 </fields>
440                 <links/>
441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
442                         <actions>
443                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
444                 <retrieve/>
445                 <!--
446                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
447                 -->
448                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
449                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
450                         </actions>
451                 </permacrud>
452         </class>
453
454         <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">
455                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
456                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
457                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
458                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
459                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
460                 </fields>
461                 <links>
462                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
463                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
464                 </links>
465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
466                         <actions>
467                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
470                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
471                         </actions>
472                 </permacrud>
473         </class>
474
475         <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">
476                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
477                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
478                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
479                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
480                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
481                 </fields>
482                 <links>
483                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
484                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
485                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
486                 </links>
487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
488                         <actions>
489                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
490                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
491                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
492                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
493                         </actions>
494                 </permacrud>
495         </class>
496
497
498         <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">
499                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
500                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
501                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
502                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
503                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
504                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
505                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
506                 </fields>
507                 <links>
508                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
509                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
510                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
511                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
512                 </links>
513         </class>
514
515     <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">
516         <fields oils_persist:primary="id">
517             <field reporter:label="ID" name="id" reporter:datatype="id"/>
518             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
519             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
520             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
521             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
522         </fields>
523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
524             <actions>
525                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
526                 <retrieve/>
527                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
528                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
529             </actions>
530         </permacrud>
531     </class>
532
533         <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">
534                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
535                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
536                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
537                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
538                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
539                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
540                 </fields>
541                 <links>
542                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
543                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
544                 </links>
545         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
546             <actions>
547                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
548                 <retrieve/>
549                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
550                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
551             </actions>
552         </permacrud>
553         </class>
554
555         <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">
556                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
557                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
558                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
559                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
560                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
561                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
562                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
563                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
564                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
565                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
566                 </fields>
567                 <links>
568                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
569                 </links>
570         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
571             <actions>
572                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
573                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
574                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
575                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
576             </actions>
577         </permacrud>
578         </class>
579
580     <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">
581         <fields oils_persist:primary="name">
582             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
583             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
584             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
585             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
586             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
587             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
588             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
589             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
590             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
591         </fields>
592         <links>
593             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
594         </links>
595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
596             <actions>
597                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
598                 <retrieve/>
599                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
600                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
601             </actions>
602         </permacrud>
603     </class>
604
605     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
606         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
607             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
608             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
609             <field reporter:label="Name" name="name" reporter:datatype="text"/>
610             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
611             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
612             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
613             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
614         </fields>
615         <links>
616             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
617         </links>
618     </class>
619
620         <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">
621                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
622                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
623                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
624                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
625                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
626                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
627                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
628                 </fields>
629                 <links>
630             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
631             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
632                 </links>
633                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
634                         <actions>
635                                 <retrieve/>
636                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
637                         </actions>
638                 </permacrud>
639         </class>
640
641         <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">
642                 <fields oils_persist:primary="key">
643                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
644                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
645                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
646                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
647                 </fields>
648                 <links/>
649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
650                         <actions>
651                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
652                                 <retrieve/>
653                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
654                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
655                         </actions>
656                 </permacrud>
657         </class>
658
659         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
660                 <fields oils_persist:primary="module">
661                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
662                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
663                 </fields>
664                 <links/>
665         </class>
666
667         <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">
668                 <fields oils_persist:primary="module">
669                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
670                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
671                 </fields>
672                 <links/>
673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
674                         <actions>
675                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
676                                 <retrieve/>
677                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
678                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
679                         </actions>
680                 </permacrud>
681         </class>
682
683         <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">
684                 <fields oils_persist:primary="module">
685                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
686                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
687                 </fields>
688                 <links/>
689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
690                         <actions>
691                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
692                                 <retrieve/>
693                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
694                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
695                         </actions>
696                 </permacrud>
697         </class>
698
699         <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">
700                 <fields oils_persist:primary="module">
701                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
702                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
703                 </fields>
704                 <links/>
705                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
706                         <actions>
707                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
708                                 <retrieve/>
709                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
710                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
711                         </actions>
712                 </permacrud>
713         </class>
714
715         <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">
716                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
717                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
718                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
719                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
720                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
721                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
722                 </fields>
723                 <links>
724                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
725                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
726                 </links>
727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
728                         <actions>
729                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
730                     <context link="event_def" field="owner"/>
731                 </create>
732                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
733                     <context link="event_def" field="owner"/>
734                 </retrieve>
735                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
736                     <context link="event_def" field="owner"/>
737                 </update>
738                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
739                     <context link="event_def" field="owner"/>
740                 </delete>
741                         </actions>
742                 </permacrud>
743         </class>
744
745         <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">
746                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
747                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
748                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
749                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
750                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
751                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
752                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
753                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
754                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
755                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
756                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
757                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
758                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
759                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
760                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
761                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
762                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
763                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
764                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
765                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
766                 </fields>
767                 <links>
768                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
769                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
770                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
771                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
772                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
773                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
774                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
775                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
776                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
777                 </links>
778                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
779                         <actions>
780                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
781                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
782                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
783                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
784                         </actions>
785                 </permacrud>
786         </class>
787
788         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
789                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
790                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
791                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
792                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
793                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
794                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
795                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
796                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
797                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
798                         <field reporter:label="State" name="state" reporter:datatype="text"/>
799                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
800                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
801                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
802                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
803                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
804                 </fields>
805                 <links>
806                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
807                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
808                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
809                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
810                 </links>
811         </class>
812
813         <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">
814                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
815                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
816                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
817                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
818                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
819                 </fields>
820                 <links>
821                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
822                 </links>
823                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
824                         <actions>
825                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
826                     <context link="event_def" field="owner"/>
827                 </create>
828                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
829                     <context link="event_def" field="owner"/>
830                 </retrieve>
831                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
832                     <context link="event_def" field="owner"/>
833                 </update>
834                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
835                     <context link="event_def" field="owner"/>
836                 </delete>
837                         </actions>
838                 </permacrud>
839         </class>
840
841         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
842                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
843                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
844                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
845                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
846                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
847                 </fields>
848                 <links>
849                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
850                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
851                 </links>
852         </class>
853
854         <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">
855                 <fields oils_persist:primary="code">
856                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
857                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
858                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
859                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
860                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
861                 </fields>
862                 <links/>
863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
864             <actions>
865                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
866                 <retrieve/>
867                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
868                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
869             </actions>
870         </permacrud>
871         </class>
872
873         <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">
874                 <fields oils_persist:primary="code">
875                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
876                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
877                 </fields>
878                 <links/>
879         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
880             <actions>
881                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
882                 <retrieve/>
883                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
884                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
885             </actions>
886         </permacrud>
887         </class>
888
889         <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">
890                 <fields oils_persist:primary="code">
891                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
892                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
893                 </fields>
894                 <links/>
895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
896             <actions>
897                 <create permission="CREATE_INVOICE_METHOD" global_required="true"/>
898                 <retrieve/>
899                 <update permission="UPDATE_INVOICE_METHOD" global_required="true"/>
900                 <delete permission="DELETE_INVOICE_METHOD" global_required="true"/>
901             </actions>
902         </permacrud>
903         </class>
904
905         <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">
906                 <fields oils_persist:primary="code">
907                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
908                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
909                 </fields>
910                 <links/>
911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
912             <actions>
913                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
914                 <retrieve permission="CREATE_COPY_BTYPE UPDATE_COPY_BTYPE DELETE_COPY_BTYPE" global_required="true"/>
915                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
916                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
917             </actions>
918         </permacrud>
919         </class>
920
921         <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">
922                 <fields oils_persist:primary="code">
923                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
924                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
925                 </fields>
926                 <links/>
927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
928             <actions>
929                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
930                 <retrieve permission="CREATE_CN_BTYPE UPDATE_CN_BTYPE DELETE_CN_BTYPE" global_required="true"/>
931                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
932                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
933             </actions>
934         </permacrud>
935         </class>
936
937         <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">
938                 <fields oils_persist:primary="code">
939                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
940                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
941                 </fields>
942                 <links/>
943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
944             <actions>
945                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
946                 <retrieve permission="CREATE_BIB_BTYPE UPDATE_BIB_BTYPE DELETE_BIB_BTYPE" global_required="true"/>
947                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
948                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
949             </actions>
950         </permacrud>
951         </class>
952
953         <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">
954                 <fields oils_persist:primary="code">
955                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
956                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
957                 </fields>
958                 <links/>
959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960             <actions>
961                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
962                 <retrieve permission="CREATE_USER_BTYPE UPDATE_USER_BTYPE DELETE_USER_BTYPE" global_required="true"/>
963                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
964                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
965             </actions>
966         </permacrud>
967         </class>
968
969         <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">
970                 <fields oils_persist:primary="code">
971                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
972                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
973                 </fields>
974                 <links/>
975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
976             <actions>
977                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
978                 <retrieve/>
979                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
980                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
981             </actions>
982         </permacrud>
983         </class>
984
985         <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">
986                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
987                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
988                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
989                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
990                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
991                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
992                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
993                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
994                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
995                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
996                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
997                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
998                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
999                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1000                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1001                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1002                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1003                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1004                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1005                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1006                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1007                 </fields>
1008                 <links>
1009                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1010                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1011                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1012                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1013                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1014                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1015                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1016                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1017                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1018                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1019                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1020                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1021             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1022                 </links>
1023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1024             <actions>
1025                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1026                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1027                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1028                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1029             </actions>
1030         </permacrud>
1031         </class>
1032
1033         <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">
1034                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1035                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1036                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1037                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1038                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1039                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link"/>
1040                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1041                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1042                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1043                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1044                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1045                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1046                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1047                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1048                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1049                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1050                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1051                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1052                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1053                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1054                 </fields>
1055                 <links>
1056                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1057                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1058                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1059                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1060                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1061                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1062                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1063                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1064                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1065                 </links>
1066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1067             <actions>
1068                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1069                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1070                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1071                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1072             </actions>
1073         </permacrud>
1074         </class>
1075
1076         <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">
1077                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1078                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1079                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1080                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1081                 </fields>
1082                 <links>
1083                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1084                 </links>
1085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1086             <actions>
1087                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1088                     <context link="matchpoint" field="org_unit"/>
1089                 </create>
1090                 <retrieve/>
1091                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1092                     <context link="matchpoint" field="org_unit"/>
1093                 </update>
1094                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1095                     <context link="matchpoint" field="org_unit"/>
1096                 </delete>
1097             </actions>
1098         </permacrud>
1099         </class>
1100
1101         <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">
1102                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1103                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1104                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1105                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1106                 </fields>
1107                 <links>
1108                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1109                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1110                 </links>
1111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1112             <actions>
1113                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1114                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1115                 </create>
1116                 <retrieve/>
1117                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1118                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1119                 </update>
1120                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1121                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1122                 </delete>
1123             </actions>
1124         </permacrud>
1125         </class>
1126
1127         <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">
1128                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1129                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1130                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1131                 </fields>
1132                 <links/>
1133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1134             <actions>
1135                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1136                 <retrieve/>
1137                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1138                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1139             </actions>
1140         </permacrud>
1141         </class>
1142
1143         <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">
1144                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1145                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1146                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1147                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1148                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1149                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1150                 </fields>
1151                 <links>
1152                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1153                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1154                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1155                 </links>
1156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1157             <actions>
1158                 <create permission="ADMIN_SURVEY">
1159                     <context link="survey" field="owner"/>
1160                 </create>
1161                 <retrieve/>
1162                 <update permission="ADMIN_SURVEY">
1163                     <context link="survey" field="owner"/>
1164                 </update>
1165                 <delete permission="ADMIN_SURVEY">
1166                     <context link="survey" field="owner"/>
1167                 </delete>
1168             </actions>
1169         </permacrud>
1170         </class>
1171         <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">
1172                 <fields oils_persist:primary="id" oils_persist:sequence="">
1173                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1174                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1175                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1176                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1177                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1178                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1179                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1180                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1181                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1182                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1183                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1184                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1185                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1186                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1187                 </fields>
1188                 <links>
1189                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1190                 </links>
1191         </class>
1192         <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">
1193                 <fields oils_persist:primary="id" oils_persist:sequence="">
1194                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1195                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1196                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1197                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1198                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1199                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1200                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1201                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1202                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1203                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1204                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1205                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1206                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1207                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1208                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1209                 </fields>
1210                 <links>
1211                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1212                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1213                 </links>
1214         </class>
1215         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1216                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1217                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1218                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1219                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1220                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1221                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1222                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1223                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1224                 </fields>
1225                 <links>
1226                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1227                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1228                 </links>
1229         </class>
1230         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1231                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1232                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1233                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1234                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1235                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1236                 </fields>
1237                 <links>
1238                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1239                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1240                 </links>
1241         </class>
1242         <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">
1243                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1244                         <field name="field" reporter:datatype="link"/>
1245                         <field name="id" reporter:datatype="id" />
1246                         <field name="source" reporter:datatype="link"/>
1247                         <field name="value" reporter:datatype="text"/>
1248                 </fields>
1249                 <links>
1250                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1251                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1252                 </links>
1253         </class>
1254         <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">
1255                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1256                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1257                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1258                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1259                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1260                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1261                 </fields>
1262                 <links>
1263                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1264                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1265                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1266                 </links>
1267         </class>
1268         <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">
1269                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1270                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1271                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1272                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1273                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1274                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1275                 </fields>
1276                 <links>
1277                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1278                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1279                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1280                 </links>
1281         </class>
1282         <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">
1283                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1284                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1285                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1286                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1287                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1288                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1289                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1290                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1291                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1292                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1293                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1294                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1295                 </fields>
1296                 <links>
1297                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1298                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1299                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1300                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1301                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1302                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1303                 </links>
1304         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1305             <actions>
1306                 <create permission="TRANSIT_COPY" context_field="owner">
1307                     <context link="target_copy" field="circ_lib"/>
1308                 </create>
1309                 <retrieve/>
1310                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1311                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1312             </actions>
1313         </permacrud>
1314         </class>
1315         <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">
1316                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1317                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1318                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1319                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1320                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1321                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1322                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1323                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1324                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1325                 </fields>
1326                 <links>
1327                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1328                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1329                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1330                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1331                 </links>
1332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1333             <actions>
1334                 <create permission="ADMIN_SURVEY">
1335                     <context link="survey" field="owner"/>
1336                 </create>
1337                 <retrieve/>
1338                 <update permission="ADMIN_SURVEY">
1339                     <context link="survey" field="owner"/>
1340                 </update>
1341                 <delete permission="ADMIN_SURVEY">
1342                     <context link="survey" field="owner"/>
1343                 </delete>
1344             </actions>
1345         </permacrud>
1346         </class>
1347         <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">
1348                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1349                         <field name="bucket" />
1350                         <field name="id" reporter:datatype="id" />
1351                         <field name="target_copy" reporter:datatype="link"/>
1352                         <field name="create_time" reporter:datatype="timestamp" />
1353                         <field name="pos" reporter:datatype="int" />
1354                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1355                 </fields>
1356                 <links>
1357                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1358                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1359             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1360                 </links>
1361         </class>
1362         <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">
1363                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1364                         <field name="id" reporter:datatype="id" />
1365                         <field name="item" reporter:datatype="link"/>
1366                         <field name="note" reporter:datatype="text" />
1367                 </fields>
1368                 <links>
1369                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1370                 </links>
1371         </class>
1372         <class id="are" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1373                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1374                         <field name="active" reporter:datatype="bool"/>
1375                         <field name="arn_source" />
1376                         <field name="arn_value" />
1377                         <field name="create_date" reporter:datatype="timestamp"/>
1378                         <field name="creator" />
1379                         <field name="deleted" reporter:datatype="bool"/>
1380                         <field name="edit_date" reporter:datatype="timestamp"/>
1381                         <field name="editor" />
1382                         <field name="id" reporter:datatype="id" />
1383                         <field name="last_xact_id" />
1384                         <field name="marc" />
1385                         <field name="source" />
1386                         <field name="fixed_fields" oils_persist:virtual="true" />
1387                         <field name="notes" oils_persist:virtual="true" />
1388                 </fields>
1389                 <links>
1390                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1391                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1392                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1393                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1394                 </links>
1395         </class>
1396         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1397                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1398                         <field name="char_encoding" />
1399                         <field name="id" />
1400                         <field name="record" />
1401                         <field name="record_status" />
1402                 </fields>
1403                 <links>
1404                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1405                 </links>
1406         </class>
1407         <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">
1408                 <fields oils_persist:primary="code" oils_persist:sequence="">
1409                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1410                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1411                 </fields>
1412                 <links/>
1413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1414             <actions>
1415                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1416                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1417                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1418                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1419             </actions>
1420         </permacrud>
1421         </class>
1422         <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">
1423                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1424                         <field name="accepting_usr" />
1425                         <field name="amount" reporter:datatype="money" />
1426                         <field name="amount_collected" reporter:datatype="money" />
1427                         <field name="approval_code" reporter:datatype="text"/>
1428                         <field name="cash_drawer" reporter:datatype="link"/>
1429                         <field name="cc_number" reporter:datatype="text"/>
1430                         <field name="cc_type" reporter:datatype="text"/>
1431                         <field name="cc_processor" reporter:datatype="text"/>
1432                         <field name="expire_month" reporter:datatype="int" />
1433                         <field name="expire_year" reporter:datatype="int" />
1434                         <field name="id" reporter:datatype="id" />
1435                         <field name="note" reporter:datatype="text"/>
1436                         <field name="payment_ts" reporter:datatype="timestamp"/>
1437                         <field name="xact" reporter:datatype="link"/>
1438                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1439                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1440                 </fields>
1441                 <links>
1442                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1443                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1444                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1445                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1446                 </links>
1447         </class>
1448         <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">
1449                 <fields oils_persist:primary="name">
1450                         <field reporter:label="Field Class" name="field_class" />
1451                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1452                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1453                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1454                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1455                 </fields>
1456                 <links/>
1457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1458             <actions>
1459                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1460                 <retrieve/>
1461                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1462                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1463             </actions>
1464         </permacrud>
1465         </class>
1466
1467         <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">
1468                 <fields oils_persist:primary="alias">
1469                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1470                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1471                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1472                 </fields>
1473                 <links>
1474                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1475                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1476                 </links>
1477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1478             <actions>
1479                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1480                 <retrieve/>
1481                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1482                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1483             </actions>
1484         </permacrud>
1485         </class>
1486
1487         <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">
1488                 <fields oils_persist:primary="name">
1489                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1490                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1491                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1492                 </fields>
1493                 <links>
1494                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1495                 </links>
1496         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1497             <actions>
1498                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1499                 <retrieve/>
1500                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1501                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1502             </actions>
1503         </permacrud>
1504         </class>
1505
1506         <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">
1507                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1508                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1509                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1510                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1511                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1512                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1513                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1514                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1515                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1516                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1517                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1518                 </fields>
1519                 <links>
1520                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1521                 </links>
1522         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1523             <actions>
1524                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1525                 <retrieve/>
1526                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1527                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1528             </actions>
1529         </permacrud>
1530         </class>
1531         <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">
1532                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1533                         <field name="id" reporter:datatype="id" />
1534                         <field name="name" reporter:datatype="text"/>
1535                         <field name="xpath" reporter:datatype="text"/>
1536                         <field name="format" reporter:datatype="link"/>
1537                         <field name="first_word" reporter:datatype="bool" />
1538                 </fields>
1539                 <links/>
1540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1541             <actions>
1542                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1543                 <retrieve/>
1544                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1545                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1546             </actions>
1547         </permacrud>
1548         </class>
1549         <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">
1550                 <fields oils_persist:primary="code" oils_persist:sequence="">
1551                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1552                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1553                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1554                 </fields>
1555                 <links/>
1556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557             <actions>
1558                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1559                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1560                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1561                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1562             </actions>
1563         </permacrud>
1564         </class>
1565         <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">
1566                 <fields oils_persist:primary="code" oils_persist:sequence="">
1567                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1568                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1569                 </fields>
1570                 <links/>
1571         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1572             <actions>
1573                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1574                 <retrieve/>
1575                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1576                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1577             </actions>
1578         </permacrud>
1579         </class>
1580         <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">
1581                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1582                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1583                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1584                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1585                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1586                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1587                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1588                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1589                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1590                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1591                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1592                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1593                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1594                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1595                 </fields>
1596                 <links>
1597                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1598                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1599                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1600                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1601                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1602                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1603                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1604                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1605                 </links>
1606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1607             <actions>
1608                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1609                 <retrieve/>
1610                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1611                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1612             </actions>
1613         </permacrud>
1614         </class>
1615         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1616                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1617                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1618                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1619                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1620                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1621                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1622                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1623                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1624                 </fields>
1625                 <links>
1626                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1627                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1628         </links>
1629         </class>
1630         <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">
1631                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1632                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1633                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1634                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1635                 </fields>
1636                 <links>
1637                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1638                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1639                 </links>
1640         </class>
1641         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1642                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1643                         <field name="id" reporter:datatype="id" />
1644                         <field name="value" oils_persist:i18n="true" />
1645                 </fields>
1646                 <links/>
1647         </class>
1648         <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">
1649                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1650                         <field name="balance_owed" reporter:datatype="money" />
1651                         <field name="total_owed" reporter:datatype="money" />
1652                         <field name="total_paid" reporter:datatype="money" />
1653                         <field name="usr" reporter:datatype="link"/>
1654                 </fields>
1655                 <links>
1656                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1657         </links>
1658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1659             <actions>
1660                 <retrieve permission="VIEW_USER">
1661                     <context link="usr" field="home_ou"/>
1662                 </retrieve>
1663             </actions>
1664         </permacrud>
1665         </class>
1666         <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">
1667                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1668                         <field name="collector" />
1669                         <field name="enter_time" reporter:datatype="timestamp"/>
1670                         <field name="id" reporter:datatype="id" />
1671                         <field name="location" reporter:datatype="link"/>
1672                         <field name="usr" reporter:datatype="link"/>
1673                 </fields>
1674                 <links>
1675                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1676                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1677                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1678                 </links>
1679         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1680             <actions>
1681                 <create permission="money.collections_tracker.create" context_field="location"/>
1682                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1683                 <delete permission="money.collections_tracker.create" context_field="location"/>
1684             </actions>
1685         </permacrud>
1686         </class>
1687         <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">
1688                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1689                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1690                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1691                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1692                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1693                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1694                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1695                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1696                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1697                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1698                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1699                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1700                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1701                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1702                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1703                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1704                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1705                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1706                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
1707                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1708                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1709                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1710                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1711                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1712                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1713                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1714                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1715                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1716                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1717                 </fields>
1718                 <links>
1719                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1720                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1721                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1722                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1723                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1724                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1725                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1726                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1727                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1728                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1729                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1730                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1731                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1732                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1733                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1734                 </links>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_MARC" global_required="true"/>
1740             </actions>
1741         </permacrud>
1742         </class>
1743         <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">
1744                 <fields oils_persist:primary="id">
1745                         <field name="dow_0_close" />
1746                         <field name="dow_0_open" />
1747                         <field name="dow_1_close" />
1748                         <field name="dow_1_open" />
1749                         <field name="dow_2_close" />
1750                         <field name="dow_2_open" />
1751                         <field name="dow_3_close" />
1752                         <field name="dow_3_open" />
1753                         <field name="dow_4_close" />
1754                         <field name="dow_4_open" />
1755                         <field name="dow_5_close" />
1756                         <field name="dow_5_open" />
1757                         <field name="dow_6_close" />
1758                         <field name="dow_6_open" />
1759                         <field name="id" reporter:datatype="id" />
1760                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1761                 </fields>
1762                 <links>
1763                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
1764                 </links>
1765         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1766             <actions>
1767                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
1768                 <retrieve/>
1769                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
1770                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
1771             </actions>
1772         </permacrud>
1773         </class>
1774         <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">
1775                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1776                         <field name="close_end" reporter:datatype="timestamp" />
1777                         <field name="close_start" reporter:datatype="timestamp" />
1778                         <field name="id" reporter:datatype="id" />
1779                         <field name="org_unit" reporter:datatype="org_unit"/>
1780                         <field name="reason" reporter:datatype="text"/>
1781                 </fields>
1782                 <links>
1783                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1784                 </links>
1785         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1786             <actions>
1787                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1788                 <retrieve/>
1789                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1790                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1791             </actions>
1792         </permacrud>
1793         </class>
1794         <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">
1795                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1796                         <field name="extended" reporter:datatype="interval"/>
1797                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1798                         <field name="max_renewals" reporter:datatype="int" />
1799                         <field name="name" reporter:datatype="text"/>
1800                         <field name="normal" reporter:datatype="interval"/>
1801                         <field name="shrt" reporter:datatype="interval"/>
1802                 </fields>
1803                 <links>
1804                 </links>
1805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1806             <actions>
1807                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1808                 <retrieve/>
1809                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1810                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1811             </actions>
1812         </permacrud>
1813         </class>
1814         <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">
1815                 <fields oils_persist:primary="id" oils_persist:sequence="">
1816                         <field name="balance_owed" reporter:datatype="money"/>
1817                         <field name="id" reporter:datatype="id" />
1818                         <field name="last_billing_note" reporter:datatype="text"/>
1819                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1820                         <field name="last_billing_type" reporter:datatype="text"/>
1821                         <field name="last_payment_note" reporter:datatype="text"/>
1822                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1823                         <field name="last_payment_type" reporter:datatype="text"/>
1824                         <field name="total_owed" reporter:datatype="money"/>
1825                         <field name="total_paid" reporter:datatype="money"/>
1826                         <field name="usr" reporter:datatype="link"/>
1827                         <field name="xact_finish" reporter:datatype="timestamp" />
1828                         <field name="xact_start" reporter:datatype="timestamp" />
1829                         <field name="xact_type" reporter:datatype="text"/>
1830                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1831                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1832                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1833                         <field name="billing_location" reporter:datatype="link"/>
1834                 </fields>
1835                 <links>
1836                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1837                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1838                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1839                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1840                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1841                 </links>
1842         </class>
1843         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1844                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1845                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1846                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1847                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1848                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1849                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1850                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1851                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1852                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1853                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1854                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1855                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1856                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1857                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1858                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1859                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1860                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1861                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1862                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
1863                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1864                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1865                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1866                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1867                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1868                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1869                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1870                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1871                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1872                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1873                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1874                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1875                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1876                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1877                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
1878                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
1879                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
1880                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
1881                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
1882                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
1883                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
1884                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
1885                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
1886                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
1887                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
1888                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
1889                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
1890                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
1891                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
1892                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
1893                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
1894                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
1895                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
1896                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1897                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1898                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
1899                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
1900                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1901                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1902                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
1903                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1904                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
1905                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
1906                 </fields>
1907                 <links>
1908                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
1909                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
1910                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
1911                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
1912                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
1913                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
1914                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
1915                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
1916                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
1917                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
1918                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
1919                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
1920                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
1921                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
1922                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
1923                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
1924                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
1925                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
1926                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
1927                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
1928                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
1929                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
1930                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
1931                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
1932                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
1933                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
1934                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
1935                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
1936                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
1937                 </links>
1938         </class>
1939
1940         <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">
1941                 <fields oils_persist:primary="name">
1942                         <field name="name" reporter:datatype="text"/>
1943                         <field name="label" reporter:datatype="text"/>
1944                         <field name="description" reporter:datatype="text"/>
1945                         <field name="datatype" reporter:datatype="text"/>
1946                         <field name="fm_class" reporter:datatype="text"/>
1947                 </fields>
1948                 <links>
1949                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
1950                 </links>
1951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1952                         <actions>
1953                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1954                                 <retrieve/>
1955                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1956                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1957                         </actions>
1958                 </permacrud>
1959         </class>
1960         <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">
1961                 <fields oils_persist:primary="name">
1962                         <field name="name" reporter:datatype="text"/>
1963                         <field name="label" reporter:datatype="text"/>
1964                         <field name="description" reporter:datatype="text"/>
1965                         <field name="datatype" reporter:datatype="text"/>
1966                         <field name="view_perm" reporter:datatype="link"/>
1967                         <field name="update_perm" reporter:datatype="link"/>
1968                         <field name="fm_class" reporter:datatype="text"/>
1969                 </fields>
1970                 <links>
1971                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
1972                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
1973                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
1974                 </links>
1975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1976                         <actions>
1977                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1978                                 <retrieve/>
1979                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1980                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1981                         </actions>
1982                 </permacrud>
1983         </class>
1984         <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">
1985                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
1986                         <field name="id" />
1987                         <field name="name"  reporter:datatype="text"/>
1988                         <field name="org_unit" reporter:datatype="org_unit"/>
1989                         <field name="value"  reporter:datatype="text"/>
1990                 </fields>
1991                 <links>
1992                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1993                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
1994                 </links>
1995         </class>
1996         <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">
1997                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
1998                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1999                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2000                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2001                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2002                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2003                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2004                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2005                 </fields>
2006                 <links>
2007                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2008                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2009                 </links>
2010         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2011             <actions>
2012                 <create permission="CREATE_COPY_NOTE">
2013                     <context link="owning_copy" field="circ_lib"/>
2014                 </create>
2015                 <retrieve permission="VIEW_COPY_NOTES">
2016                     <context link="owning_copy" field="circ_lib"/>
2017                 </retrieve>
2018                 <update permission="UPDATE_COPY_NOTE">
2019                     <context link="owning_copy" field="circ_lib"/>
2020                 </update>
2021                 <delete permission="DELETE_COPY_NOTE">
2022                     <context link="owning_copy" field="circ_lib"/>
2023                 </delete>
2024             </actions>
2025         </permacrud>
2026         </class>
2027         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2028                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2029                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2030                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2031                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2032                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2033                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2034                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2035                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2036                 </fields>
2037                 <links>
2038                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2039                 </links>
2040         </class>
2041         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2042                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2043                         <field name="fingerprint"  reporter:datatype="text"/>
2044                         <field name="id" reporter:datatype="id" />
2045                         <field name="master_record" reporter:datatype="link"/>
2046                         <field name="mods"  reporter:datatype="text"/>
2047                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2048                 </fields>
2049                 <links>
2050                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2051                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2052                 </links>
2053         </class>
2054         <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">
2055                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2056                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2057                         <field name="name"  reporter:datatype="text"/>
2058                 </fields>
2059                 <links/>
2060         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2061             <actions>
2062                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2063                 <retrieve/>
2064                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2065                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2066             </actions>
2067         </permacrud>
2068         </class>
2069         <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">
2070                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2071                         <field name="code"  reporter:datatype="text"/>
2072                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2073                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2074                 </fields>
2075                 <links/>
2076         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2077             <actions>
2078                 <create permission="CREATE_PERM" global_required="true"/>
2079                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2080                 <update permission="UPDATE_PERM" global_required="true"/>
2081                 <delete permission="DELETE_PERM" global_required="true"/>
2082             </actions>
2083         </permacrud>
2084         </class>
2085         <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">
2086                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2087                         <field name="id" reporter:datatype="id" />
2088                         <field name="metarecord" reporter:datatype="link"/>
2089                         <field name="source" reporter:datatype="link"/>
2090                 </fields>
2091                 <links>
2092                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2093                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2094                 </links>
2095         </class>
2096         <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">
2097                 <oils_persist:source_definition>
2098                         SELECT * FROM (
2099                                 SELECT * FROM metabib.author_field_entry
2100                                                 UNION ALL
2101                                 SELECT * FROM metabib.keyword_field_entry
2102                                                 UNION ALL
2103                                 SELECT * FROM metabib.title_field_entry
2104                                                 UNION ALL
2105                                 SELECT * FROM metabib.subject_field_entry
2106                                                 UNION ALL
2107                                 SELECT * FROM metabib.series_field_entry
2108                         )x
2109                         WHERE x.index_vector = ''
2110                 </oils_persist:source_definition>
2111                 <fields>
2112                         <field name="field" reporter:datatype="link"/>
2113                         <field name="id" reporter:datatype="id" />
2114                         <field name="source" reporter:datatype="link"/>
2115                         <field name="value"  reporter:datatype="text"/>
2116                 </fields>
2117                 <links>
2118                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2119                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2120                 </links>
2121         </class>
2122         <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">
2123                 <oils_persist:source_definition>
2124                         SELECT * FROM metabib.author_field_entry
2125                                                 UNION ALL
2126                         SELECT * FROM metabib.keyword_field_entry
2127                                                 UNION ALL
2128                         SELECT * FROM metabib.title_field_entry
2129                                                 UNION ALL
2130                         SELECT * FROM metabib.subject_field_entry
2131                                                 UNION ALL
2132                         SELECT * FROM metabib.series_field_entry
2133                 </oils_persist:source_definition>
2134                 <fields>
2135                         <field name="field" reporter:datatype="link"/>
2136                         <field name="id" reporter:datatype="id" />
2137                         <field name="source" reporter:datatype="link"/>
2138                         <field name="value"  reporter:datatype="text"/>
2139                 </fields>
2140                 <links>
2141                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2142                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2143                 </links>
2144         </class>
2145         <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">
2146                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2147                         <field name="field" reporter:datatype="link"/>
2148                         <field name="id" reporter:datatype="id" />
2149                         <field name="source" reporter:datatype="link"/>
2150                         <field name="value"  reporter:datatype="text"/>
2151                 </fields>
2152                 <links>
2153                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2154                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2155                 </links>
2156         </class>
2157         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2158                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2159                         <field name="accepting_usr" reporter:datatype="link"/>
2160                         <field name="amount" reporter:datatype="money" />
2161                         <field name="amount_collected" reporter:datatype="money" />
2162                         <field name="cash_drawer" reporter:datatype="link"/>
2163                         <field name="id" reporter:datatype="id" />
2164                         <field name="note"  reporter:datatype="text"/>
2165                         <field name="payment_ts" reporter:datatype="timestamp"/>
2166                         <field name="xact" reporter:datatype="link"/>
2167                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2168                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2169                 </fields>
2170                 <links>
2171                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2172                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2173                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2174                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2175                 </links>
2176         </class>
2177         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2178                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2179                         <field name="accepting_usr" reporter:datatype="link"/>
2180                         <field name="amount" reporter:datatype="money" />
2181                         <field name="amount_collected" reporter:datatype="money" />
2182                         <field name="id" reporter:datatype="id" />
2183                         <field name="note"  reporter:datatype="text"/>
2184                         <field name="payment_ts" reporter:datatype="timestamp"/>
2185                         <field name="xact" reporter:datatype="link"/>
2186                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2187                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2188                 </fields>
2189                 <links>
2190                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2191                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2192                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2193                 </links>
2194         </class>
2195         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2196                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2197                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2198                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2199                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2200                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2201                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2202                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2203                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2204                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2205                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2206                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2207                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2208                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2209                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2210                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2211                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2212                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2213                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2214                 </fields>
2215                 <links>
2216                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2217                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2218                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2219                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2220                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2221                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2222                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2223                 </links>
2224         </class>
2225
2226         <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">
2227                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2228                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2229                         <field name="name"  reporter:datatype="text"/>
2230                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2231                         <field name="block_list" reporter:datatype="text"/>
2232                         <field name="org_depth" reporter:datatype="int"/>
2233                 </fields>
2234                 <links/>
2235         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2236             <actions>
2237                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2238                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2239                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2240                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2241             </actions>
2242         </permacrud>
2243         </class>
2244         <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">
2245                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2246                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2247                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2248                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2249                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2250                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2251                 </fields>
2252                 <links>
2253                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2254                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2255                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2256         </links>
2257         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2258             <actions>
2259                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2260                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2261                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2262                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2263             </actions>
2264         </permacrud>
2265         </class>
2266         <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">
2267                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2268                         <field name="holdable" reporter:datatype="bool"/>
2269                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2270                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2271                         <field name="opac_visible" reporter:datatype="bool"/>
2272                 </fields>
2273                 <links/>
2274         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2275             <actions>
2276                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2277                 <retrieve permission="CREATE_COPY_STATUS UPDATE_COPY_STATUS DELETE_COPY_STATUS" global_required="true"/>
2278                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2279                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2280             </actions>
2281         </permacrud>
2282         </class>
2283         <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">
2284                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2285                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2286                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2287                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2288                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2289                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2290                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2291                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2292                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2293                 </fields>
2294                 <links>
2295                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2296                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2297                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2298                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2299                 </links>
2300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2301                         <actions>
2302                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2303                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2304                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2305                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2306                         </actions>
2307                 </permacrud>
2308         </class>
2309         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2310                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2311                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2312                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2313                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2314                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2315                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2316                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2317                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2318                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2319                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2320                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2321                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2322                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2323                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2324                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2325                 </fields>
2326                 <links>
2327                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2328                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2329                 </links>
2330         </class>
2331         <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">
2332                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2333                         <field name="call_number" />
2334                         <field name="create_date" reporter:datatype="timestamp"/>
2335                         <field name="creator" reporter:datatype="link"/>
2336                         <field name="id" reporter:datatype="id" />
2337                         <field name="pub" reporter:datatype="bool"/>
2338                         <field name="title"  reporter:datatype="text"/>
2339                         <field name="value"  reporter:datatype="text"/>
2340                 </fields>
2341                 <links>
2342                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2343                 </links>
2344         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2345             <actions>
2346                 <create permission="CREATE_VOLUME_NOTE">
2347                     <context link="call_number" field="owning_lib"/>
2348                 </create>
2349                 <retrieve permission="VIEW_VOLUME_NOTES">
2350                     <context link="call_number" field="owning_lib"/>
2351                 </retrieve>
2352                 <update permission="UPDATE_VOLUME_NOTE">
2353                     <context link="call_number" field="owning_lib"/>
2354                 </update>
2355                 <delete permission="DELETE_VOLUME_NOTE">
2356                     <context link="call_number" field="owning_lib"/>
2357                 </delete>
2358             </actions>
2359         </permacrud>
2360         </class>
2361         <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">
2362                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2363                         <field name="create_date" reporter:datatype="timestamp"/>
2364                         <field name="creator" reporter:datatype="link"/>
2365                         <field name="edit_date" reporter:datatype="timestamp"/>
2366                         <field name="editor" reporter:datatype="link"/>
2367                         <field name="id" reporter:datatype="id" />
2368                         <field name="record" reporter:datatype="link"/>
2369                         <field name="value" reporter:datatype="text"/>
2370                 </fields>
2371                 <links>
2372                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2373                 </links>
2374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2375             <actions>
2376                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2377                 <retrieve permission="VIEW_AUTHORITY_RECORD_NOTES" global_required='true'/>
2378                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2379                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2380             </actions>
2381         </permacrud>
2382         </class>
2383         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2384                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2385                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2386                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2387                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2388                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2389                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2390                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2391                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2392                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2393                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2394                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2395                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2396                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2397                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2398                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2399                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2400                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2401                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2402                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2403                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2404                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2405                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2406                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2407                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2408                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2409                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2410                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2411                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2412                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2413                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2414                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2415                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2416                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2417                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2418                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2419                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2420                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2421                 </fields>
2422                 <links>
2423                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2424                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2425                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2426                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2427                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2428                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2429                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2430                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2431                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2432                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2433                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2434                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2435                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2436                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2437                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2438                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2439                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2440                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2441                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2442                 </links>
2443         </class>
2444         <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">
2445                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2446                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2447                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2448                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2449                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2450                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2451                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2452                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2453                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2454                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2455                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2456                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2457                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2458                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2459                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2460                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2461                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2462                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2463                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2464                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2465                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2466                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2467                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2468                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2469                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2470                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2471                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2472                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2473                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2474                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2475                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2476                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2477                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2478                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2479                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2480                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2481                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2482                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2483                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2484                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2485                 </fields>
2486                 <links>
2487                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2488                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2489                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2490                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2491                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2492                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2493                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2494                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2495                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2496                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2497                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2498                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2499                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2500                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2501                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2502                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2503                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2504                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2505                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2506                 </links>
2507         </class>
2508         <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">
2509                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2510                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2511                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2512                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2513                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2514                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2515                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2516                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2517                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2518                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2519                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2520                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2521                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2522                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2523                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2524                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2525                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2526                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2527                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2528                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2529                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2530                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2531                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2532                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2533                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2534                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2535                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2536                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2537                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2538                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2539                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2540                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2541                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2542                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2543                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2544                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2545                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2546                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2547                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2548                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2549                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2550                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2551                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2552                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2553                 </fields>
2554                 <links>
2555                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2556                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2557                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2558                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2559                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2560                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2561                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2562                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2563                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2564                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2565                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2566                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2567                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2568                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2569                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2570                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2571                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2572                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2573                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2574                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2575                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2576                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2577                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2578                 </links>
2579         </class>
2580
2581         <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">
2582                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2583                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id"/>
2584                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2585                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2586                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2587                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2588                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2589                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2590                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2591                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2592                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
2593                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2594                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2595                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
2596                 </fields>
2597                 <links>
2598                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2599                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2600                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
2601                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
2602                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
2603                 </links>
2604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2605                         <actions>
2606                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2607                                 <retrieve />
2608                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2609                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2610                         </actions>
2611                 </permacrud>
2612         </class>
2613
2614         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
2615                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
2616                         <field reporter:label="Resource ID" name="id" reporter:datatype="id"/>
2617                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2618                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
2619                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
2620                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2621                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
2622                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
2623                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
2624                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2625                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2626                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2627                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
2628                 </fields>
2629                 <links>
2630                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2631                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
2632                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
2633                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
2634                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
2635                 </links>
2636                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2637                         <actions>
2638                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2639                                 <retrieve />
2640                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2641                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2642                         </actions>
2643                 </permacrud>
2644         </class>
2645         
2646         <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">
2647                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
2648                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id"/>
2649                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2650                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
2651                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
2652                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
2653                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
2654                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2655                 </fields>
2656                 <links>
2657                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2658                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
2659                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
2660                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
2661                 </links>
2662                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2663                         <actions>
2664                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2665                                 <retrieve />
2666                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2667                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2668                         </actions>
2669                 </permacrud>
2670         </class>
2671         
2672         <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">
2673                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
2674                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id"/>
2675                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2676                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
2677                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
2678                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2679                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2680                 </fields>
2681                 <links>
2682                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2683                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
2684                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
2685                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
2686                 </links>
2687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2688                         <actions>
2689                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2690                                 <retrieve />
2691                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2692                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2693                         </actions>
2694                 </permacrud>
2695         </class>
2696         
2697         <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">
2698                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
2699                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
2700                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
2701                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
2702                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
2703                 </fields>
2704                 <links>
2705                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
2706                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
2707                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
2708                 </links>
2709                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2710                         <actions>
2711                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2712                                 <retrieve />
2713                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2714                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2715                         </actions>
2716                 </permacrud>
2717         </class>
2718         
2719         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
2720                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2721                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2722                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2723                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
2724                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
2725                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2726                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2727                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2728                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2729                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2730                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
2731                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2732                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
2733                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
2734                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
2735                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
2736                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
2737                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
2738                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
2739                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2740                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2741                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2742                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
2743                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
2744                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
2745                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
2746                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
2747                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
2748                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2749                 </fields>
2750                 <links>
2751                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2752                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2753                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2754                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2755                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2756                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2757                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
2758                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2759                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2760                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2761                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
2762                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
2763                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
2764                 </links>
2765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2766                         <actions>
2767                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2768                                 <retrieve />
2769                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2770                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2771                         </actions>
2772                 </permacrud>
2773         </class>
2774         
2775         <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">
2776                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
2777                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
2778                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
2779                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
2780                 </fields>
2781                 <links>
2782                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
2783                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
2784                 </links>
2785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2786                         <actions>
2787                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2788                                 <retrieve />
2789                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2790                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2791                         </actions>
2792                 </permacrud>
2793         </class>
2794
2795         <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">
2796                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2797                         <field name="bucket" reporter:datatype="link"/>
2798                         <field name="id" reporter:datatype="id" />
2799                         <field name="target_call_number" reporter:datatype="link" />
2800                         <field name="create_time" reporter:datatype="timestamp" />
2801                         <field name="pos" reporter:datatype="int" />
2802                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2803                 </fields>
2804                 <links>
2805                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2806                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2807             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2808                 </links>
2809         </class>
2810         <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">
2811                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2812                         <field name="id" reporter:datatype="id" />
2813                         <field name="item" reporter:datatype="link"/>
2814                         <field name="note" reporter:datatype="text" />
2815                 </fields>
2816                 <links>
2817                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2818                 </links>
2819         </class>
2820         <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">
2821                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2822                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2823                         <field name="btype" reporter:datatype="text"/>
2824                         <field name="id" reporter:datatype="id" />
2825                         <field name="name" reporter:datatype="text"/>
2826                         <field name="owner" reporter:datatype="link"/>
2827                         <field name="pub" reporter:datatype="bool"/>
2828                         <field name="create_time" reporter:datatype="timestamp" />
2829                 </fields>
2830                 <links>
2831                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2832                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2833                 </links>
2834         </class>
2835         <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">
2836                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2837                         <field name="id" reporter:datatype="id" />
2838                         <field name="bucket" reporter:datatype="link"/>
2839                         <field name="note" reporter:datatype="text" />
2840                 </fields>
2841                 <links>
2842                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2843                 </links>
2844         </class>
2845         <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">
2846                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2847                         <field name="hold" reporter:datatype="link"/>
2848                         <field name="id" reporter:datatype="id" />
2849                         <field name="target_copy" reporter:datatype="link"/>
2850                 </fields>
2851                 <links>
2852                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2853                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2854                 </links>
2855         </class>
2856         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2857                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2858                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2859                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2860                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2861                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2862                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2863                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2864                 </fields>
2865                 <links>
2866                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2867                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2868                 </links>
2869         </class>
2870         <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">
2871                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2872                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2873                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2874                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2875                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2876                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2877                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2878                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2879                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
2880                 </fields>
2881                 <links>
2882                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2883                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2884                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
2885                 </links>
2886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2887             <actions>
2888                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2889                 <retrieve/>
2890                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2891                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2892             </actions>
2893         </permacrud>
2894         </class>
2895
2896     <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">
2897         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
2898             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
2899             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
2900             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
2901             <field reporter:label="Position" name="position" reporter:datatype="int"/>
2902         </fields>
2903         <links>
2904             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
2905             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
2906         </links>
2907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2908             <actions>
2909                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2910                 <retrieve/>
2911                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2912                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2913             </actions>
2914         </permacrud>
2915     </class>
2916
2917         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2918                 <fields>
2919                         <field name="id" oils_persist:virtual="true" />
2920                         <field name="location" oils_persist:virtual="true" />
2921                         <field name="owning_lib" oils_persist:virtual="true" />
2922                         <field name="holdings" oils_persist:virtual="true" />
2923                         <field name="current_holdings" oils_persist:virtual="true" />
2924                         <field name="supplements" oils_persist:virtual="true" />
2925                         <field name="current_supplements" oils_persist:virtual="true" />
2926                         <field name="indexes" oils_persist:virtual="true" />
2927                         <field name="current_indexes" oils_persist:virtual="true" />
2928                         <field name="online" oils_persist:virtual="true" />
2929                         <field name="missing" oils_persist:virtual="true" />
2930                         <field name="incomplete" oils_persist:virtual="true" />
2931                 </fields>
2932         </class>
2933         <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">
2934                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
2935                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2936                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2937                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2938                         <field reporter:label="Creator" name="creator" />
2939                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2940                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
2941                         <field reporter:label="Editor" name="editor" />
2942                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2943                         <field reporter:label="Last Transaction ID" name="last_xact_id" />
2944                         <field reporter:label="MARC" name="marc" />
2945                         <field reporter:label="Source" name="source" />
2946                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
2947                 </fields>
2948                 <links>
2949                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2950                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2951                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2952                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2953                 </links>
2954                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2955                         <actions>
2956                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
2957                                 <retrieve/>
2958                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
2959                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
2960                         </actions>
2961                 </permacrud>
2962         </class>
2963         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
2964                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
2965                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2966                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link"/>
2967                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
2968                         <field reporter:label="Start date" name="start_date" reporter:datatype="timestamp"/>
2969                         <field reporter:label="End date" name="end_date" reporter:datatype="timestamp"/>
2970                 </fields>
2971                 <links>
2972                         <link field="call_number" reltype="might_have" key="id" map="" class="acn"/>
2973                         <link field="uri" reltype="might_have" key="id" map="" class="auri"/>
2974                 </links>
2975         </class>
2976         <class id="sbu" controller="open-ils.cstore" oils_obj:fieldmapper="serial::binding_unit" oils_persist:tablename="serial.binding_unit" reporter:label="Binding Unit">
2977                 <fields oils_persist:primary="id" oils_persist:sequence="serial.binding_unit_id_seq">
2978                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2979                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
2980                         <field reporter:label="Label" name="label" />
2981                 </fields>
2982                 <links>
2983                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2984                 </links>
2985         </class>
2986         <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
2987                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
2988                         <field name="id" reporter:datatype="id" />
2989                         <field name="subscription" reporter:datatype="link"/>
2990                         <field name="target_copy" reporter:datatype="link"/>
2991                         <field name="location" reporter:datatype="link"/>
2992                         <field name="binding_unit" reporter:datatype="link"/>
2993                         <field name="label" />
2994                 </fields>
2995                 <links>
2996                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2997                         <link field="target_copy" reltype="might_have" key="id" map="" class="acp"/>
2998                         <link field="location" reltype="might_have" key="id" map="" class="acpl"/>
2999                         <link field="binding_unit" reltype="might_have" key="id" map="" class="sbu"/>
3000                 </links>
3001         </class>
3002         <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
3003                 <fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
3004                         <field name="id" reporter:datatype="id" />
3005                         <field name="subscription" reporter:datatype="link"/>
3006                         <field name="generated_coverage" reporter:datatype="text"/>
3007                         <field name="textual_holdings" reporter:datatype="text"/>
3008                 </fields>
3009                 <links>
3010                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3011                 </links>
3012         </class>
3013         <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
3014                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
3015                         <field name="id" reporter:datatype="id" />
3016                         <field name="subscription" reporter:datatype="link"/>
3017                         <field name="generated_coverage" reporter:datatype="text"/>
3018                         <field name="textual_holdings" reporter:datatype="text"/>
3019                 </fields>
3020                 <links>
3021                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3022                 </links>
3023         </class>
3024         <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
3025                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
3026                         <field name="id" reporter:datatype="id" />
3027                         <field name="subscription" reporter:datatype="link"/>
3028                         <field name="generated_coverage" reporter:datatype="text"/>
3029                         <field name="textual_holdings" reporter:datatype="text"/>
3030                 </fields>
3031                 <links>
3032                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3033                 </links>
3034         </class>
3035
3036         <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">
3037                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
3038                         <field name="id" reporter:datatype="id" />
3039                         <field name="owning_copy" reporter:datatype="link"/>
3040                         <field name="stat_cat" reporter:datatype="link"/>
3041                         <field name="stat_cat_entry" reporter:datatype="link"/>
3042                 </fields>
3043                 <links>
3044                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3045                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
3046                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
3047                 </links>
3048         </class>
3049         <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">
3050                 <fields oils_persist:primary="code">
3051                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3052                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3053                 </fields>
3054                 <links/>
3055         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3056             <actions>
3057                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3058                 <retrieve/>
3059                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3060                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3061             </actions>
3062         </permacrud>
3063         </class>
3064         <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">
3065                 <fields oils_persist:primary="code">
3066                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
3067                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3068                 </fields>
3069                 <links/>
3070         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3071             <actions>
3072                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3073                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
3074                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3075                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3076             </actions>
3077         </permacrud>
3078         </class>
3079         <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">
3080                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
3081                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
3082                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
3083                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
3084                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
3085                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
3086                 </fields>
3087                 <links>
3088             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3089         </links>
3090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3091             <actions>
3092                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3093                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3094                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3095                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3096             </actions>
3097         </permacrud>
3098         </class>
3099         <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">
3100                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
3101                         <field name="id" reporter:datatype="id" />
3102                         <field name="name" reporter:datatype="text"/>
3103                 </fields>
3104                 <links/>
3105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3106             <actions>
3107                 <create permission="CREATE_LASSO" global_required="true"/>
3108                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
3109                 <update permission="UPDATE_LASSO" global_required="true"/>
3110                 <delete permission="DELETE_LASSO" global_required="true"/>
3111             </actions>
3112         </permacrud>
3113         </class>
3114         <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">
3115                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
3116                         <field name="id" reporter:datatype="id" />
3117                         <field name="lasso" reporter:datatype="link"/>
3118                         <field name="org_unit" reporter:datatype="org_unit"/>
3119                 </fields>
3120                 <links>
3121                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
3122                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3123                 </links>
3124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3125             <actions>
3126                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
3127                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
3128                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
3129                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
3130             </actions>
3131         </permacrud>
3132         </class>
3133         <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">
3134                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3135                         <field name="id" reporter:datatype="id" />
3136                         <field name="from_org" reporter:datatype="org_unit"/>
3137                         <field name="to_org" reporter:datatype="org_unit"/>
3138                         <field name="prox" reporter:datatype="int" />
3139                 </fields>
3140                 <links>
3141                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
3142                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
3143                 </links>
3144         </class>
3145         <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">
3146                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3147                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3148                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
3149                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
3150                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
3151                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
3152                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
3153                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
3154                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
3155                 </fields>
3156                 <links/>
3157         </class>
3158         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
3159                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
3160                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
3161                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3162                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
3163                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
3164                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
3165                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3166                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
3167                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3168                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
3169                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
3170                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
3171                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
3172                 </fields>
3173                 <links>
3174                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3175                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
3176                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
3177                 </links>
3178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3179             <actions>
3180                 <create permission="ADMIN_SURVEY" context_field="owner"/>
3181                 <retrieve/>
3182                 <update permission="ADMIN_SURVEY" context_field="owner"/>
3183                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
3184             </actions>
3185         </permacrud>
3186         </class>
3187         <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">
3188                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
3189                         <field name="address_type"  reporter:datatype="text"/>
3190                         <field name="city"  reporter:datatype="text"/>
3191                         <field name="country"  reporter:datatype="text"/>
3192                         <field name="county"  reporter:datatype="text"/>
3193                         <field name="id" reporter:datatype="id" />
3194                         <field name="org_unit" reporter:datatype="org_unit"/>
3195                         <field name="post_code"  reporter:datatype="text"/>
3196                         <field name="state"  reporter:datatype="text"/>
3197                         <field name="street1"  reporter:datatype="text"/>
3198                         <field name="street2"  reporter:datatype="text"/>
3199                         <field name="valid" reporter:datatype="bool"/>
3200                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
3201                 </fields>
3202                 <links>
3203                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3204                 </links>
3205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3206             <actions>
3207                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
3208                 <retrieve/>
3209                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
3210                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
3211             </actions>
3212         </permacrud>
3213         </class>
3214         <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">
3215                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
3216                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
3217                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
3218                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
3219                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
3220                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3221                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
3222                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
3223                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
3224                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
3225                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
3226                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
3227                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
3228                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
3229                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
3230                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
3231                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
3232                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
3233                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
3234                         <field reporter:label="Item Selection Depth" name="selection_depth" />
3235                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
3236                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
3237                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
3238                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
3239                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
3240                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
3241                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
3242                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
3243                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
3244                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
3245                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
3246                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
3247                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
3248                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
3249                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
3250                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
3251                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
3252                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
3253                 </fields>
3254                 <links>
3255                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
3256                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
3257                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
3258                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
3259                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
3260                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3261                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3262                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3263                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
3264                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
3265                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
3266                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
3267                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
3268                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
3269                 </links>
3270         </class>
3271         <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">
3272                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
3273                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3274                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
3275                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3276                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
3277                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
3278                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
3279                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
3280                 </fields>
3281                 <links>
3282                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3283                 </links>
3284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3285                         <actions>
3286                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
3287                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
3288                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
3289                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
3290                         </actions>
3291                 </permacrud>
3292         </class>
3293         <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">
3294                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
3295                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3296                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
3297                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
3298                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
3299                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
3300                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3301                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3302                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
3303                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
3304                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text"/>
3305                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
3306                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
3307                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3308                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
3309                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
3310                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
3311                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3312                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3313                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3314                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3315                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
3316                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3317                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
3318                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
3319                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3320                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
3321                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3322                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3323                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3324                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
3325                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
3326                 </fields>
3327                 <links>
3328                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
3329                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
3330                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
3331                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
3332                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
3333                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
3334                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
3335                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
3336                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
3337                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
3338                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
3339                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
3340                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
3341                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
3342                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
3343                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
3344                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
3345                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
3346                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
3347                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
3348                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
3349                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
3350                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
3351                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
3352                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
3353                 </links>
3354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3355             <actions>
3356                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
3357                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
3358                     <context field="id"/>
3359                     <context field="parent_ou"/>
3360                                 </retrieve>
3361                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
3362                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
3363             </actions>
3364         </permacrud>
3365         </class>
3366         <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">
3367                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
3368                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3369                         <field name="btype" reporter:datatype="text"/>
3370                         <field name="id" reporter:datatype="id" />
3371                         <field name="name"  reporter:datatype="text"/>
3372                         <field name="owner" reporter:datatype="link"/>
3373                         <field name="pub" reporter:datatype="bool"/>
3374                         <field name="create_time" reporter:datatype="timestamp" />
3375                 </fields>
3376                 <links>
3377                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3378                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
3379                 </links>
3380         </class>
3381         <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">
3382                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
3383                         <field name="id" reporter:datatype="id" />
3384                         <field name="bucket" reporter:datatype="link"/>
3385                         <field name="note" reporter:datatype="text" />
3386                 </fields>
3387                 <links>
3388                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3389                 </links>
3390         </class>
3391         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
3392                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
3393                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3394                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3395                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3396                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3397                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3398                 </fields>
3399                 <links>
3400                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3401                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
3402                 </links>
3403         </class>
3404         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
3405                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
3406                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
3407                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3408                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
3409                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3410                 </fields>
3411                 <links>
3412                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3413                 </links>
3414         </class>
3415         <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">
3416                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
3417                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3418                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3419                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3420                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3421                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3422                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
3423                 </fields>
3424                 <links>
3425                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3426                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
3427                 </links>
3428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3429             <actions>
3430                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
3431                 <retrieve />
3432                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
3433                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
3434             </actions>
3435         </permacrud>
3436         </class>
3437         <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">
3438                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
3439                         <field name="field" reporter:datatype="link"/>
3440                         <field name="id" reporter:datatype="id" />
3441                         <field name="source" reporter:datatype="link"/>
3442                         <field name="value"  reporter:datatype="text"/>
3443                 </fields>
3444                 <links>
3445                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3446                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3447                 </links>
3448         </class>
3449         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
3450                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
3451                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3452                         <field name="btype" reporter:datatype="text"/>
3453                         <field name="id" reporter:datatype="id" />
3454                         <field name="name"  reporter:datatype="text"/>
3455                         <field name="owner" reporter:datatype="link"/>
3456                         <field name="pub" reporter:datatype="bool"/>
3457                         <field name="create_time" reporter:datatype="timestamp" />
3458                 </fields>
3459                 <links>
3460                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3461                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
3462                 </links>
3463         </class>
3464         <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">
3465                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
3466                         <field name="id" reporter:datatype="id" />
3467                         <field name="bucket" reporter:datatype="link"/>
3468                         <field name="note" reporter:datatype="text" />
3469                 </fields>
3470                 <links>
3471                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3472                 </links>
3473         </class>
3474         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
3475                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3476                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3477                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3478                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3479                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
3480                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
3481                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3482                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3483                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3484                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3485                 </fields>
3486                 <links>
3487                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3488                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3489                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3490                 </links>
3491         </class>
3492         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
3493                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
3494                         <field name="id" reporter:datatype="id" />
3495                         <field name="ind1" />
3496                         <field name="ind2" />
3497                         <field name="record" />
3498                         <field name="subfield" />
3499                         <field name="tag" />
3500                         <field name="value" />
3501                 </fields>
3502                 <links>
3503                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3504                 </links>
3505         </class>
3506         <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">
3507                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
3508                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
3509                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3510                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
3511                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3512                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3513                 </fields>
3514                 <links>
3515                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3516                 </links>
3517         </class>
3518         <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">
3519                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
3520                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3521                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
3522                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
3523                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
3524                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3525                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3526                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
3527                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
3528                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
3529                 </fields>
3530                 <links>
3531                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
3532                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
3533                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
3534                 </links>
3535         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3536             <actions>
3537                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
3538                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT" global_required="true"/>
3539                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
3540                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
3541             </actions>
3542         </permacrud>
3543         </class>
3544         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
3545                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
3546                         <field name="create_date" reporter:datatype="timestamp"/>
3547                         <field name="creator" reporter:datatype="link"/>
3548                         <field name="edit_date" reporter:datatype="timestamp"/>
3549                         <field name="editor" reporter:datatype="link"/>
3550                         <field name="id" reporter:datatype="id" />
3551                         <field name="pub" reporter:datatype="bool"/>
3552                         <field name="record" reporter:datatype="link"/>
3553                         <field name="value"  reporter:datatype="text"/>
3554                 </fields>
3555                 <links>
3556                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3557                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3558                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3559                 </links>
3560         </class>
3561         <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">
3562                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3563                         <field name="balance_owed" reporter:datatype="money" />
3564                         <field name="total_owed" reporter:datatype="money" />
3565                         <field name="total_paid" reporter:datatype="money" />
3566                         <field name="usr" reporter:datatype="link"/>
3567                 </fields>
3568                 <links>
3569                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3570                 </links>
3571         </class>
3572         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
3573                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3574                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
3575                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3576                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
3577                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3578                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
3579                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
3580                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3581                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3582                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3583                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3584                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3585                 </fields>
3586                 <links>
3587                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3588                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3589                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3590                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3591                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3592                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3593                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3594                 </links>
3595         </class>
3596         <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">
3597                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
3598                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
3599                         <field name="quality" reporter:datatype="int" />
3600                         <field name="source" reporter:datatype="text"/>
3601                         <field name="transcendant" reporter:datatype="bool"/>
3602                 </fields>
3603                 <links/>
3604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3605             <actions>
3606                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
3607                 <retrieve/>
3608                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
3609                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
3610             </actions>
3611         </permacrud>
3612         </class>
3613         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
3614                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3615                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3616                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3617                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3618                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3619                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3620                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3621                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3622                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3623                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3624                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3625                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3626                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3627                 </fields>
3628                 <links>
3629                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3630                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3631                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3632                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3633                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3634                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3635                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3636                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3637                 </links>
3638         </class>
3639         <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">
3640                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
3641                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3642                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3643                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3644                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
3645                 </fields>
3646                 <links>
3647                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3648                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3649                 </links>
3650         </class>
3651         <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">
3652                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
3653                         <field name="bucket" reporter:datatype="link"/>
3654                         <field name="id" reporter:datatype="id" />
3655                         <field name="target_user" reporter:datatype="link"/>
3656                         <field name="create_time" reporter:datatype="timestamp" />
3657                         <field name="pos" reporter:datatype="int" />
3658                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3659                 </fields>
3660                 <links>
3661                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
3662                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3663             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
3664                 </links>
3665         </class>
3666         <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">
3667                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
3668                         <field name="id" reporter:datatype="id" />
3669                         <field name="item" reporter:datatype="link"/>
3670                         <field name="note" reporter:datatype="text" />
3671                 </fields>
3672                 <links>
3673                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
3674                 </links>
3675         </class>
3676         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
3677                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3678                         <field name="balance_owed" reporter:datatype="money" />
3679                         <field name="total_owed" reporter:datatype="money" />
3680                         <field name="total_paid" reporter:datatype="money" />
3681                         <field name="usr" reporter:datatype="link"/>
3682                 </fields>
3683                 <links>
3684                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3685                 </links>
3686         </class>
3687         <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">
3688                 <fields oils_persist:primary="code" oils_persist:sequence="">
3689                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
3690                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3691                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3692                 </fields>
3693                 <links/>
3694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3695             <actions>
3696                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3697                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
3698                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3699                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3700             </actions>
3701         </permacrud>
3702         </class>
3703         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
3704                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3705                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3706                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3707                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3708                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3709                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3710                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3711                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3712                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3713                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3714                 </fields>
3715                 <links>
3716                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3717                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3718                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3719                 </links>
3720         </class>
3721         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
3722                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3723                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3724                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3725                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3726                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3727                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3728                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3729                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3730                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3731                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3732                 </fields>
3733                 <links>
3734                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3735                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3736                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3737                 </links>
3738         </class>
3739         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
3740                 <fields oils_persist:primary="id" oils_persist:sequence="">
3741                         <field name="checkin_lib" reporter:datatype="link"/>
3742                         <field name="checkin_staff" reporter:datatype="link"/>
3743                         <field name="checkin_time" reporter:datatype="timestamp"/>
3744                         <field name="circ_lib"  reporter:datatype="org_unit"/>
3745                         <field name="circ_staff" reporter:datatype="link"/>
3746                         <field name="desk_renewal" reporter:datatype="bool"/>
3747                         <field name="due_date" reporter:datatype="timestamp"/>
3748                         <field name="duration" reporter:datatype="interval"/>
3749                         <field name="duration_rule" reporter:datatype="link"/>
3750                         <field name="fine_interval" reporter:datatype="interval"/>
3751                         <field name="id" reporter:datatype="id" />
3752                         <field name="max_fine" reporter:datatype="money" />
3753                         <field name="max_fine_rule" reporter:datatype="link"/>
3754                         <field name="opac_renewal" reporter:datatype="bool"/>
3755                         <field name="phone_renewal" reporter:datatype="bool"/>
3756                         <field name="recurring_fine" reporter:datatype="money" />
3757                         <field name="recurring_fine_rule" reporter:datatype="link"/>
3758                         <field name="renewal_remaining" reporter:datatype="int" />
3759                         <field name="stop_fines" reporter:datatype="text"/>
3760                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
3761                         <field name="target_copy" reporter:datatype="link"/>
3762                         <field name="usr" reporter:datatype="link"/>
3763                         <field name="xact_finish" reporter:datatype="timestamp" />
3764                         <field name="xact_start" reporter:datatype="timestamp" />
3765                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3766                 </fields>
3767                 <links>
3768                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3769                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3770                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3771                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3772                 </links>
3773         </class>
3774         <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">
3775                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
3776                         <field name="field" reporter:datatype="link"/>
3777                         <field name="id" reporter:datatype="id" />
3778                         <field name="source" reporter:datatype="link"/>
3779                         <field name="value" reporter:datatype="text"/>
3780                 </fields>
3781                 <links>
3782                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3783                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3784                 </links>
3785         </class>
3786         <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">
3787                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
3788                         <field name="high" reporter:datatype="money" />
3789                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3790                         <field name="low" reporter:datatype="money" />
3791                         <field name="name" reporter:datatype="text"/>
3792                         <field name="normal" reporter:datatype="money" />
3793                         <field name="recurrence_interval" reporter:datatype="interval"/>
3794                 </fields>
3795                 <links/>
3796         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3797             <actions>
3798                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3799                 <retrieve/>
3800                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3801                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3802             </actions>
3803         </permacrud>
3804         </class>
3805         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
3806                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3807                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3808                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3809                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3810                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
3811                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
3812                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3813                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3814                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3815                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
3816                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3817                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3818                 </fields>
3819                 <links>
3820                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3821                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3822                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3823                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3824                 </links>
3825         </class>
3826         <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">
3827                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3828                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3829                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3830                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3831                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3832                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3833                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3834                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3835                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3836                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3837                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3838                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3839                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3840                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3841                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3842                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3843                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3844                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3845                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3846                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3847                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3848                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3849                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3850                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
3851                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3852                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3853                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3854                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3855                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3856                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3857                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3858                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3859                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3860                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3861                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3862                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3863                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3864                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3865                 </fields>
3866                 <links>
3867                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3868                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3869                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3870                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3871                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3872                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3873                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3874                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3875                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3876                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3877                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3878                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3879                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3880                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3881                 </links>
3882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3883             <actions>
3884                 <create permission="CREATE_COPY">
3885                     <context link="call_number" field="owning_lib"/>
3886                 </create>
3887                 <retrieve/>
3888                 <update permission="UPDATE_COPY">
3889                     <context link="call_number" field="owning_lib"/>
3890                 </update>
3891                 <delete permission="DELETE_COPY">
3892                     <context link="call_number" field="owning_lib"/>
3893                 </delete>
3894             </actions>
3895         </permacrud>
3896         </class>
3897         <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">
3898                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
3899                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
3900                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3901                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3902                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
3903                 </fields>
3904                 <links/>
3905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3906             <actions>
3907                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3908                 <retrieve/>
3909                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3910                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3911             </actions>
3912         </permacrud>
3913         </class>
3914         <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">
3915                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
3916                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
3917                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3918                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3919                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
3920                 </fields>
3921                 <links/>
3922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3923             <actions>
3924                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3925                 <retrieve/>
3926                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3927                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3928             </actions>
3929         </permacrud>
3930         </class>
3931         <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">
3932                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
3933                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3934                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3935                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3936                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3937                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
3938                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
3939                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
3940                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
3941                 </fields>
3942                 <links>
3943                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
3944                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
3945                 </links>
3946         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3947             <actions>
3948                 <create permission="CREATE_PERM" global_required="true"/>
3949                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
3950                 <update permission="UPDATE_PERM" global_required="true"/>
3951                 <delete permission="DELETE_PERM" global_required="true"/>
3952             </actions>
3953         </permacrud>
3954         </class>
3955         <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">
3956                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
3957                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3958                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
3959                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
3960                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
3961                 </fields>
3962                 <links>
3963                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
3964                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
3965                 </links>
3966         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3967             <actions>
3968                 <create permission="ADMIN_SURVEY">
3969                     <context link="question" jump="survey" field="owner"/>
3970                 </create>
3971                 <retrieve/>
3972                 <update permission="ADMIN_SURVEY">
3973                     <context link="question" jump="survey" field="owner"/>
3974                 </update>
3975                 <delete permission="ADMIN_SURVEY">
3976                     <context link="question" jump="survey" field="owner"/>
3977                 </delete>
3978             </actions>
3979         </permacrud>
3980         </class>
3981         <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">
3982                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
3983                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3984                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
3985                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
3986                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
3987                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
3988                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
3989                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
3990                 </fields>
3991                 <links>
3992                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
3993                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3994                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
3995                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3996                 </links>
3997         </class>
3998         <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">
3999                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4000                         <field name="balance_owed" reporter:datatype="money" />
4001                         <field name="total_owed" reporter:datatype="money" />
4002                         <field name="total_paid" reporter:datatype="money" />
4003                         <field name="usr" reporter:datatype="link"/>
4004                 </fields>
4005                 <links>
4006                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4007                 </links>
4008         </class>
4009         <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">
4010                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
4011                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
4012                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
4013                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
4014                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4015                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4016                 </fields>
4017                 <links>
4018                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4019                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4020                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4021                 </links>
4022         </class>
4023         <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">
4024                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
4025                         <field name="field" reporter:datatype="link"/>
4026                         <field name="id" reporter:datatype="id" />
4027                         <field name="source" reporter:datatype="link"/>
4028                         <field name="value" reporter:datatype="text"/>
4029                 </fields>
4030                 <links>
4031                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4032                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4033                 </links>
4034         </class>
4035         <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">
4036                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
4037                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4038                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
4039                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
4040                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
4041                 </fields>
4042                 <links>
4043                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
4044                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4045                 </links>
4046         </class>
4047         <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">
4048                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
4049                         <field name="depth" reporter:datatype="int" />
4050                         <field name="grantable" reporter:datatype="bool"/>
4051                         <field name="grp" reporter:datatype="link"/>
4052                         <field name="id" reporter:datatype="id" />
4053                         <field name="perm" reporter:datatype="link"/>
4054                 </fields>
4055                 <links>
4056                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4057                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4058                 </links>
4059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4060             <actions>
4061                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
4062                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
4063                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
4064                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
4065             </actions>
4066         </permacrud>
4067         </class>
4068         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
4069                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
4070                         <field name="items" oils_persist:virtual="true" />
4071                         <field name="btype" reporter:datatype="text"/>
4072                         <field name="id" reporter:datatype="id" />
4073                         <field name="name" reporter:datatype="text"/>
4074                         <field name="owner" reporter:datatype="link"/>
4075                         <field name="pub" reporter:datatype="bool"/>
4076                         <field name="create_time" reporter:datatype="timestamp" />
4077                 </fields>
4078                 <links>
4079                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4080                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
4081                 </links>
4082         </class>
4083         <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">
4084                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
4085                         <field name="id" reporter:datatype="id" />
4086                         <field name="bucket" reporter:datatype="link"/>
4087                         <field name="note" reporter:datatype="text" />
4088                 </fields>
4089                 <links>
4090                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
4091                 </links>
4092         </class>
4093         <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">
4094                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
4095                         <field name="id" reporter:datatype="int" />
4096                         <field name="usr" reporter:datatype="link"/>
4097                         <field name="work_ou" reporter:datatype="link"/>
4098                 </fields>
4099                 <links>
4100                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4101                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
4102                 </links>
4103         </class>
4104         <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">
4105                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
4106                         <field name="depth" reporter:datatype="int"/>
4107                         <field name="grantable" reporter:datatype="bool"/>
4108                         <field name="id" reporter:datatype="id" />
4109                         <field name="perm" reporter:datatype="link"/>
4110                         <field name="usr" reporter:datatype="link"/>
4111                 </fields>
4112                 <links>
4113                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4114                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4115                 </links>
4116         </class>
4117         <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">
4118                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
4119                         <field name="object_id" reporter:datatype="text"/>
4120                         <field name="grantable" reporter:datatype="bool"/>
4121                         <field name="id" reporter:datatype="id" />
4122                         <field name="perm" reporter:datatype="link"/>
4123                         <field name="usr" reporter:datatype="link"/>
4124                         <field name="object_type" reporter:datatype="text"/>
4125                 </fields>
4126                 <links>
4127                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4128                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4129                 </links>
4130         </class>
4131         <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">
4132                 <fields oils_persist:primary="id" oils_persist:sequence="">
4133                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4134                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4135                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4136                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4137                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4138                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4139                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4140                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4141                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4142                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4143                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4144                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4145                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4146                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4147                 </fields>
4148                 <links>
4149                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4150                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4151                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4152                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4153                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4154                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4155                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4156                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4157                 </links>
4158         </class>
4159         <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">
4160                 <fields oils_persist:primary="id" oils_persist:sequence="">
4161                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4162                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4163                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4164                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4165                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4166                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4167                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4168                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4169                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4170                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4171                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4172                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4173                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4174                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4175                 </fields>
4176                 <links>
4177                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4178                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4179                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4180                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4181                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4182                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4183                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4184                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4185                 </links>
4186         </class>
4187         <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">
4188                 <fields oils_persist:primary="id" oils_persist:sequence="">
4189                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4190                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4191                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4192                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4193                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4194                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4195                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4196                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4197                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4198                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4199                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4200                 </fields>
4201                 <links>
4202                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4203                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4204                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4205                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4206                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4207                 </links>
4208         </class>
4209         <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">
4210                 <fields oils_persist:primary="id" oils_persist:sequence="">
4211                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4212                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4213                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4214                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4215                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4216                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4217                         <field reporter:label="Accepting User" name="accepting_usr" />
4218                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
4219                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4220                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4221                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4222                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4223                 </fields>
4224                 <links>
4225                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4226                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4227                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4228                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4229                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4230                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4231                 </links>
4232         </class>
4233         <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">
4234                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
4235                         <field name="bucket" reporter:datatype="link"/>
4236                         <field name="id" reporter:datatype="id" />
4237                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
4238                         <field name="create_time" reporter:datatype="timestamp" />
4239                         <field name="pos" reporter:datatype="int" />
4240                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4241                 </fields>
4242                 <links>
4243                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
4244                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4245             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
4246                 </links>
4247         </class>
4248         <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">
4249                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
4250                         <field name="id" reporter:datatype="id" />
4251                         <field name="item" reporter:datatype="link"/>
4252                         <field name="note" reporter:datatype="text" />
4253                 </fields>
4254                 <links>
4255                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
4256                 </links>
4257         </class>
4258         <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">
4259                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
4260                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
4261                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4262                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4263                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4264                 </fields>
4265                 <links>
4266                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4267                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4268                 </links>
4269         </class>
4270
4271         <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">
4272                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
4273                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
4274                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4275                 </fields>
4276                 <links/>
4277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4278             <actions>
4279                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4280                 <retrieve/>
4281                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4282                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4283             </actions>
4284         </permacrud>
4285         </class>
4286
4287
4288         <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">
4289                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4290                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4291                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4292                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4293                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
4294                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4295                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4296                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4297                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4298                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4299                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4300                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4301                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4302                 </fields>
4303                 <links>
4304                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4305                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
4306                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4307                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4308                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4309                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4310                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4311                 </links>
4312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4313             <actions>
4314                 <create permission="TRANSIT_COPY">
4315                     <context link="target_copy" field="owner"/>
4316                 </create>
4317                 <retrieve/>
4318                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4319                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4320             </actions>
4321         </permacrud>
4322         </class>
4323         <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">
4324                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4325                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4326                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4327                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4328                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
4329                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4330                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4331                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4332                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4333                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4334                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4335                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4336                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4337                 </fields>
4338                 <links>
4339                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4340                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4341                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4342                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4343                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4344                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4345                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4346                 </links>
4347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4348             <actions>
4349                 <create permission="TRANSIT_COPY" context_field="owner">
4350                     <context link="target_copy" field="circ_lib"/>
4351                 </create>
4352                 <retrieve/>
4353                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4354                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4355             </actions>
4356         </permacrud>
4357         </class>
4358         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
4359                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
4360                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4361                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
4362                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
4363                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
4364                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4365                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
4366                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4367                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
4368                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4369                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
4370                 </fields>
4371                 <links>
4372                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4373                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
4374                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
4375                 </links>
4376         </class>
4377         <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">
4378                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
4379                         <field name="grp" />
4380                         <field name="id" reporter:datatype="id" />
4381                         <field name="usr" />
4382                 </fields>
4383                 <links>
4384                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4385                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4386                 </links>
4387         </class>
4388         <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">
4389                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
4390                         <field name="id" reporter:datatype="id" />
4391                         <field name="fq_field" reporter:datatype="text"/>
4392                         <field name="identity_value" reporter:datatype="text"/>
4393                         <field name="translation" reporter:datatype="text"/>
4394                         <field name="string" reporter:datatype="text"/>
4395                 </fields>
4396                 <links>
4397                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
4398                 </links>
4399         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4400             <actions>
4401                 <create permission="CREATE_TRANSLATION" global_required="true"/>
4402                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
4403                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
4404                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
4405             </actions>
4406         </permacrud>
4407         </class>
4408         <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">
4409                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
4410                         <field name="id" reporter:datatype="id" />
4411                         <field name="fm_class" reporter:datatype="text"/>
4412                         <field name="field" reporter:datatype="text"/>
4413                         <field name="owner" reporter:datatype="org_unit"/>
4414                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
4415                 </fields>
4416                 <links>
4417                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4418                 </links>
4419         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4420             <actions>
4421                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4422                 <retrieve/>
4423                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4424                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4425             </actions>
4426         </permacrud>
4427         </class>
4428         <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">
4429                 <fields oils_persist:primary="code">
4430                         <field name="code" reporter:datatype="id" />
4431                         <field name="marc_code" reporter:datatype="text"/>
4432                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4433                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4434                 </fields>
4435                 <links/>
4436         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4437             <actions>
4438                 <create permission="CREATE_LOCALE" global_required="true"/>
4439                 <retrieve permission="CREATE_LOCALE UPDATE_LOCALE DELETE_LOCALE" global_required="true"/>
4440                 <update permission="UPDATE_LOCALE" global_required="true"/>
4441                 <delete permission="DELETE_LOCALE" global_required="true"/>
4442             </actions>
4443         </permacrud>
4444         </class>
4445         <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">
4446                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
4447                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4448                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
4449                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
4450             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
4451                 </fields>
4452                 <links>
4453                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4454                 </links>
4455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4456             <actions>
4457                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
4458                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
4459                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
4460                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
4461             </actions>
4462         </permacrud>
4463         </class>
4464
4465         <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">
4466                 <fields oils_persist:primary="id">
4467                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4468                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4469                 </fields>
4470                 <links/>
4471         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4472             <actions>
4473                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4474                 <retrieve/>
4475                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4476                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4477             </actions>
4478         </permacrud>
4479         </class>
4480
4481         <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">
4482                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
4483                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4484                         <field reporter:label="User" name="usr" reporter:datatype="link" />
4485                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
4486                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
4487                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
4488                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
4489                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
4490                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
4491                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
4492                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
4493                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
4494                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
4495                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
4496                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
4497                         <field reporter:label="Title" name="title" reporter:datatype="text" />
4498                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
4499                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4500                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
4501                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
4502                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
4503                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
4504                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
4505                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
4506                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
4507                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
4508                 </fields>
4509                 <links>
4510                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4511                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4512                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4513                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
4514                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
4515                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
4516                 </links>
4517         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4518             <actions>
4519                 <create permission="user_request.create">
4520                     <context link="usr" field="home_ou"/>
4521                                 </create>
4522                 <retrieve permission="user_request.view">
4523                     <context link="usr" field="home_ou"/>
4524                                 </retrieve>
4525                 <update permission="user_request.update">
4526                     <context link="usr" field="home_ou"/>
4527                                 </update>
4528                 <delete permission="user_request.delete">
4529                     <context link="usr" field="home_ou"/>
4530                                 </delete>
4531             </actions>
4532         </permacrud>
4533         </class>
4534
4535         <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">
4536                 <fields oils_persist:primary="code">
4537                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
4538                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4539                 </fields>
4540                 <links/>
4541         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4542             <actions>
4543                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4544                 <retrieve/>
4545                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4546                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4547             </actions>
4548         </permacrud>
4549         </class>
4550
4551         <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">
4552                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
4553                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
4554                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
4555                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
4556                         <field reporter:label="Ratio" name="ratio" />
4557                 </fields>
4558                 <links>
4559                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
4560                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
4561                 </links>
4562                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4563                         <actions>
4564                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4565                                 <retrieve/>
4566                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4567                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4568                         </actions>
4569                 </permacrud>
4570         </class>
4571
4572         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
4573                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
4574                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4575                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4576                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4577                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4578                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4579                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
4580                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
4581                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
4582                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
4583                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
4584                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
4585                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4586                         <field reporter:label="Email" name="email" reporter:datatype="text" />
4587                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
4588                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
4589                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
4590                 </fields>
4591                 <links>
4592                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4593                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4594             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
4595             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
4596             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
4597                 </links>
4598         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4599             <actions>
4600                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
4601                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
4602                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
4603                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
4604             </actions>
4605         </permacrud>
4606         </class>
4607
4608         <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">
4609                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
4610                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
4611                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4612                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4613                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4614                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4615                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4616                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
4617                 </fields>
4618                 <links>
4619                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4620                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4621                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4622                 </links>
4623         </class>
4624
4625         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
4626                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
4627                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
4628                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
4629                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4630                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
4631                         <field reporter:label="Receive Date/Time" name="recv_date" reporter:datatype="timestamp" />
4632                         <field reporter:label="Receive Method" name="receive_method" reporter:datatype="link" />
4633                         <field reporter:label="Invoice Type" name="invoice_type" reporter:datatype="text" />
4634                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
4635                 </fields>
4636                 <links>
4637                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
4638                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4639                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
4640                         <link field="receive_method" reltype="has_a" key="id" map="" class="acqim"/>
4641                 </links>
4642         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4643             <actions>
4644                 <create   permission="ADMIN_INVOICE" context_field="receiver"/>
4645                 <retrieve permission="ADMIN_INVOICE" context_field="receiver"/>
4646                 <update   permission="ADMIN_INVOICE" context_field="receiver"/>
4647                 <delete   permission="ADMIN_INVOICE" context_field="receiver"/>
4648             </actions>
4649         </permacrud>
4650         </class>
4651
4652         <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">
4653                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
4654                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4655                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
4656                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
4657                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
4658                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
4659                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
4660                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4661                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
4662                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
4663                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
4664                 </fields>
4665                 <links>
4666                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
4667                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4668                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4669                 </links>
4670         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4671             <actions>
4672                 <create   permission="ADMIN_INVOICE">
4673                                         <context link="invoice" field="receiver"/>
4674                                 </create>
4675                 <retrieve permission="ADMIN_INVOICE">
4676                                         <context link="invoice" field="receiver"/>
4677                                 </retrieve>
4678                 <update   permission="ADMIN_INVOICE">
4679                                         <context link="invoice" field="receiver"/>
4680                                 </update>
4681                                 <delete   permission="ADMIN_INVOICE">
4682                                         <context link="invoice" field="receiver"/>
4683                                 </delete>
4684             </actions>
4685         </permacrud>
4686         </class>
4687
4688         <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">
4689                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
4690                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4691                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
4692                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
4693                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
4694                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
4695                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
4696                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4697                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4698                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
4699                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
4700                 </fields>
4701                 <links>
4702                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
4703                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4704                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
4705                 </links>
4706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4707             <actions>
4708                 <create   permission="ADMIN_INVOICE">
4709                                         <context link="invoice" field="receiver"/>
4710                                 </create>
4711                 <retrieve permission="ADMIN_INVOICE">
4712                                         <context link="invoice" field="receiver"/>
4713                                 </retrieve>
4714                 <update   permission="ADMIN_INVOICE">
4715                                         <context link="invoice" field="receiver"/>
4716                                 </update>
4717                                 <delete   permission="ADMIN_INVOICE">
4718                                         <context link="invoice" field="receiver"/>
4719                                 </delete>
4720             </actions>
4721         </permacrud>
4722         </class>
4723
4724         <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">
4725                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
4726                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
4727                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4728                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4729                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4730                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4731                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4732                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
4733                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4734                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
4735                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
4736                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
4737                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
4738                 </fields>
4739                 <links>
4740                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4741                 </links>
4742         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4743             <actions>
4744                 <create permission="ADMIN_PROVIDER">
4745                     <context link="provider" field="owner"/>
4746                 </create>
4747                 <retrieve permission="ADMIN_PROVIDER">
4748                     <context link="provider" field="owner"/>
4749                 </retrieve>
4750                 <update permission="ADMIN_PROVIDER">
4751                     <context link="provider" field="owner"/>
4752                 </update>
4753                 <delete permission="ADMIN_PROVIDER">
4754                     <context link="provider" field="owner"/>
4755                 </delete>
4756             </actions>
4757         </permacrud>
4758         </class>
4759
4760         <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">
4761                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
4762                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4763                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4764                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4765                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
4766                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
4767                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
4768         </fields>
4769                 <links>
4770                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4771                 </links>
4772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4773             <actions>
4774                 <create permission="ADMIN_PROVIDER">
4775                     <context link="provider" field="owner"/>
4776                 </create>
4777                 <retrieve permission="ADMIN_PROVIDER">
4778                     <context link="provider" field="owner"/>
4779                 </retrieve>
4780                 <update permission="ADMIN_PROVIDER">
4781                     <context link="provider" field="owner"/>
4782                 </update>
4783                 <delete permission="ADMIN_PROVIDER">
4784                     <context link="provider" field="owner"/>
4785                 </delete>
4786             </actions>
4787         </permacrud>
4788     </class>
4789         <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">
4790                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
4791                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4792                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4793                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4794                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4795                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4796                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4797                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4798                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4799                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4800                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
4801                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4802                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
4803                 </fields>
4804                 <links>
4805                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
4806                 </links>
4807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4808             <actions>
4809                 <create permission="ADMIN_PROVIDER">
4810                     <context link="contact" jump='provider' field="owner"/>
4811                 </create>
4812                 <retrieve permission="ADMIN_PROVIDER">
4813                     <context link="contact" jump='provider' field="owner"/>
4814                 </retrieve>
4815                 <update permission="ADMIN_PROVIDER">
4816                     <context link="contact" jump='provider' field="owner"/>
4817                 </update>
4818                 <delete permission="ADMIN_PROVIDER">
4819                     <context link="contact" jump='provider' field="owner"/>
4820                 </delete>
4821             </actions>
4822         </permacrud>
4823         </class>
4824
4825         <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">
4826                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
4827                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
4828                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
4829                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
4830                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
4831                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
4832                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
4833                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
4834                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4835                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
4836                 </fields>
4837                 <links>
4838                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
4839                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
4840                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
4841                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
4842                 </links>
4843                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4844                 </permacrud>
4845         </class>
4846
4847         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
4848                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
4849                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4850                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
4851                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
4852                 </fields>
4853                 <links>
4854             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
4855                 </links>
4856                 <!--
4857                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4858                         But here's what it should look like if we ever do use pcrud.
4859                 -->
4860                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4861                         <actions>
4862                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4863                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4864                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4865                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4866                         </actions>
4867                 </permacrud>
4868         </class>
4869
4870         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
4871                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
4872                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4873                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
4874                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
4875                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
4876                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
4877                 </fields>
4878                 <links>
4879                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4880                 </links>
4881                 <!--
4882                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4883                         But here's what it should look like if we ever do use pcrud.
4884                 -->
4885                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4886                         <actions>
4887                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4888                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4889                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4890                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4891                         </actions>
4892                 </permacrud>
4893         </class>
4894
4895         <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">
4896                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
4897                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4898                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4899                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4900                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4901                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4902                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4903                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4904                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
4905                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4906                 </fields>
4907                 <links>
4908                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4909                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4910             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
4911             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
4912                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
4913                 </links>
4914         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4915             <actions>
4916                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4917                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
4918                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4919                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4920             </actions>
4921         </permacrud>
4922         </class>
4923
4924         <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">
4925                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
4926                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
4927                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
4928                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4929                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4930                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
4931                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
4932                 </fields>
4933                 <links>
4934                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4935                 </links>
4936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4937                         <actions>
4938                                 <create permission="ADMIN_FUNDING_SOURCE">
4939                     <context link="funding_source" field="owner"/>
4940                 </create>
4941                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
4942                     <context link="funding_source" field="owner"/>
4943                 </retrieve>
4944                                 <update permission="ADMIN_FUNDING_SOURCE">
4945                     <context link="funding_source" field="owner"/>
4946                 </update>
4947                                 <delete permission="ADMIN_FUNDING_SOURCE">
4948                     <context link="funding_source" field="owner"/>
4949                 </delete>
4950                         </actions>
4951                 </permacrud>
4952         </class>
4953
4954         <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">
4955                 <fields oils_persist:primary="id">
4956                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
4957                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
4958                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
4959                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
4960                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
4961                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4962                 </fields>
4963                 <links>
4964                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4965                 </links>
4966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4967                 </permacrud>
4968         </class>
4969
4970         <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">
4971                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
4972                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
4973                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4974                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
4975                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
4976                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4977                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
4978                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
4979                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4980                 </fields>
4981                 <links>
4982                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4983                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4984                 </links>
4985                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4986                         <actions>
4987                                 <create permission="ADMIN_ACQ_FUND">
4988                     <context link="fund" field="org"/>
4989                 </create>
4990                                 <retrieve permission="ADMIN_ACQ_FUND">
4991                     <context link="fund" field="org"/>
4992                 </retrieve>
4993                                 <update permission="ADMIN_ACQ_FUND">
4994                     <context link="fund" field="org"/>
4995                 </update>
4996                                 <delete permission="ADMIN_ACQ_FUND">
4997                     <context link="fund" field="org"/>
4998                 </delete>
4999                         </actions>
5000                 </permacrud>
5001         </class>
5002
5003         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
5004                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
5005                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5006                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5007                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5008                         <field reporter:label="Year" name="year" reporter:datatype="int" />
5009                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
5010                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5011                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
5012                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
5013                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5014                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
5015                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
5016                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5017                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5018                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
5019                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
5020                 </fields>
5021                 <links>
5022                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5023                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5024             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
5025             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
5026             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
5027                 </links>
5028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5029             <actions>
5030                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
5031                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
5032                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
5033                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
5034             </actions>
5035         </permacrud>
5036         </class>
5037
5038         <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">
5039                 <fields oils_persist:primary="fund">
5040                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5041                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5042                 </fields>
5043                 <links>
5044                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5045                 </links>
5046         </class>
5047
5048         <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">
5049                 <fields oils_persist:primary="fund">
5050                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5051                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
5052                 </fields>
5053                 <links>
5054                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5055                 </links>
5056         </class>
5057
5058         <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">
5059                 <fields oils_persist:primary="fund">
5060                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5061                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
5062                 </fields>
5063                 <links>
5064                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5065                 </links>
5066         </class>
5067
5068         <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">
5069                 <fields oils_persist:primary="fund">
5070                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5071                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5072                 </fields>
5073                 <links>
5074                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5075                 </links>
5076         </class>
5077
5078         <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">
5079                 <fields oils_persist:primary="fund">
5080                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5081                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
5082                 </fields>
5083                 <links>
5084                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5085                 </links>
5086         </class>
5087
5088    <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">
5089         <fields oils_persist:primary="fund">
5090             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5091             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5092         </fields>
5093         <links>
5094             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5095         </links>
5096     </class>
5097
5098    <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">
5099         <fields oils_persist:primary="fund">
5100             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5101             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
5102         </fields>
5103         <links>
5104             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5105         </links>
5106     </class>
5107
5108    <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">
5109         <fields oils_persist:primary="fund">
5110             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5111             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5112         </fields>
5113         <links>
5114             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5115         </links>
5116     </class>
5117
5118    <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">
5119         <fields oils_persist:primary="fund">
5120             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5121             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
5122         </fields>
5123         <links>
5124             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5125         </links>
5126     </class>
5127
5128    <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">
5129         <fields oils_persist:primary="fund">
5130             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5131             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
5132         </fields>
5133         <links>
5134             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5135         </links>
5136     </class>
5137
5138         <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">
5139                 <fields oils_persist:primary="funding_source">
5140                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5141                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
5142                 </fields>
5143                 <links>
5144                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5145                 </links>
5146         </class>
5147
5148         <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">
5149                 <fields oils_persist:primary="funding_source">
5150                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5151                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
5152                 </fields>
5153                 <links>
5154                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5155                 </links>
5156         </class>
5157
5158         <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">
5159                 <fields oils_persist:primary="funding_source">
5160                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5161                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
5162                 </fields>
5163                 <links>
5164                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5165                 </links>
5166         </class>
5167
5168         <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">
5169                 <fields oils_persist:primary="fund">
5170                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5171                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
5172                 </fields>
5173                 <links>
5174                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5175                 </links>
5176         </class>
5177
5178         <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">
5179                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
5180                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5181                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5182                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5183                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5184                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5185                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5186                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5187                 </fields>
5188                 <links>
5189                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5190                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5191                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5192                 </links>
5193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5194                         <actions>
5195                                 <create permission="ADMIN_ACQ_FUND">
5196                     <context link="fund" field="org"/>
5197                 </create>
5198                                 <retrieve permission="ADMIN_ACQ_FUND">
5199                     <context link="fund" field="org"/>
5200                 </retrieve>
5201                                 <update permission="ADMIN_ACQ_FUND">
5202                     <context link="fund" field="org"/>
5203                 </update>
5204                                 <delete permission="ADMIN_ACQ_FUND">
5205                     <context link="fund" field="org"/>
5206                 </delete>
5207                         </actions>
5208                 </permacrud>
5209         </class>
5210
5211     <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">
5212         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
5213             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5214             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5215             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5216             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
5217             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
5218             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5219             <field reporter:label="Note" name="note" reporter:datatype="text" />
5220             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5221         </fields>
5222         <links>
5223             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5224             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5225             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5226         </links>
5227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5228                         <actions>
5229                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5230                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5231                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5232                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5233                         </actions>
5234                 </permacrud>
5235     </class>
5236
5237         <class id="acqpl" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Pick List">
5238                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
5239                         <field reporter:label="Picklist ID" name="id" reporter:datatype="id" />
5240                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5241                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" />
5242                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5243                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5244                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5245                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
5246                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
5247                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5248                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5249                 </fields>
5250                 <links>
5251                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5252                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5253                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5254                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5255                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
5256                 </links>
5257         </class>
5258
5259         <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">
5260                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
5261                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5262                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
5263                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5264                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5265                 </fields>
5266                 <links>
5267                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5268                 </links>
5269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5270                         <actions>
5271                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5272                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
5273                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5274                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5275                         </actions>
5276                 </permacrud>
5277         </class>
5278
5279         <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">
5280                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
5281                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" />
5282                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5283                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5284                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5285                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5286                         <field reporter:label="State" name="state" reporter:datatype="text" />
5287                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
5288                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5289                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5290                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
5291                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5292                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5293                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5294                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
5295                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5296                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="link" />
5297                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
5298                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
5299                 </fields>
5300                 <links>
5301                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5302                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5303                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5304                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
5305                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5306                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
5307                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
5308                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5309                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5310                 </links>
5311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5312                         <actions>
5313                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5314                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5315                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5316                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5317                         </actions>
5318                 </permacrud>
5319         </class>
5320
5321         <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">
5322                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
5323                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5324                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5325                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5326                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
5327                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
5328                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5329                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5330                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
5331                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5332                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5333                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5334                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5335                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
5336                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5337                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5338                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5339                 </fields>
5340                 <links>
5341                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
5342                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5343                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5344                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5345                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5346                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5347                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5348                 </links>
5349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5350             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5351                 </permacrud>
5352         </class>
5353
5354         <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">
5355                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
5356                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5357                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5358                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5359                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5360                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5361                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5362                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
5363                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
5364                 </fields>
5365                 <links>
5366                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5367                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5368                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5369                 </links>
5370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5371             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5372                 <context link="purchase_order" field="ordering_agency"/>
5373             </retrieve>
5374             <create permission="CREATE_PURCHASE_ORDER">
5375                 <context link="purchase_order" field="ordering_agency"/>
5376             </create>
5377             <update permission="CREATE_PURCHASE_ORDER">
5378                 <context link="purchase_order" field="ordering_agency"/>
5379             </update>
5380             <delete permission="CREATE_PURCHASE_ORDER">
5381                 <context link="purchase_order" field="ordering_agency"/>
5382             </delete>
5383                 </permacrud>
5384         </class>
5385
5386         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
5387                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
5388                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
5389                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
5390                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link" />
5391                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5392                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5393                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5394                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5395                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
5396                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
5397                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
5398                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
5399                         <field reporter:label="State" name="state" reporter:datatype="text" />
5400                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5401                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5402                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
5403                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5404                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5405                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
5406                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
5407                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
5408                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
5409                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
5410                 </fields>
5411                 <links>
5412                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5413                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5414                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5415                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5416                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5417                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5418                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5419                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
5420                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
5421                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
5422                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5423                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
5424                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
5425                 </links>
5426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5427             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
5428                 <context link="purchase_order" field="ordering_agency"/>
5429                 <context link="picklist" field="org_unit"/>
5430             </retrieve>
5431                 </permacrud>
5432         </class>
5433
5434         <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">
5435                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
5436                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5437                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5438                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5439                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
5440                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5441                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5442                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
5443                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5444                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5445                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link"/>
5446                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
5447                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5448                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5449                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5450                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
5451                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
5452                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
5453                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5454                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
5455                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5456                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5457                 </fields>
5458                 <links>
5459                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
5460                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5461                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5462                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5463                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5464                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5465                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5466                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5467                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5468                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
5469                 </links>
5470                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5471             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5472                 <context link="purchase_order" field="ordering_agency"/>
5473                 <context link="picklist" field="org_unit"/>
5474             </retrieve>
5475                 </permacrud>
5476         </class>
5477
5478         <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">
5479                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
5480                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
5481                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
5482                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5483                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
5484                 </fields>
5485                 <links>
5486                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5487                 </links>
5488                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5489                         <actions>
5490                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5491                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
5492                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5493                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5494                         </actions>
5495                 </permacrud>
5496         </class>
5497
5498         <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">
5499                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
5500                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
5501                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
5502                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5503                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5504                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5505                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5506                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5507                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
5508                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
5509                 </fields>
5510                 <links>
5511                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5512                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5513                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5514                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
5515                 </links>
5516         </class>
5517
5518         <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">
5519                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
5520                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
5521                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
5522                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
5523                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
5524                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
5525                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
5526                 </fields>
5527                 <links>
5528                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5529                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
5530                 </links>
5531         </class>
5532
5533         <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">
5534                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
5535                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
5536                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5537                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
5538                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
5539                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
5540                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
5541                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5542                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
5543                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
5544                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
5545                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
5546                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5547                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
5548                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5549                 </fields>
5550                 <links>
5551                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5552                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
5553                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5554                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5555                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5556                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5557                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5558                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5559                 </links>
5560         </class>
5561
5562         <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">
5563                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5564                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5565                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5566                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5567                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5568                 </fields>
5569                 <links/>
5570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5571                         <actions>
5572                                 <retrieve />
5573                         </actions>
5574                 </permacrud>
5575         </class>
5576
5577         <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">
5578                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5579                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5580                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5581                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5582                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5583                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5584             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5585                 </fields>
5586                 <links/>
5587         <permacrud>
5588             <actions>
5589                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5590                 <retrieve />
5591                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5592                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5593             </actions>
5594         </permacrud>
5595         </class>
5596
5597         <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">
5598                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5599                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5600                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5601                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5602                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5603                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5604                 </fields>
5605                 <links/>
5606         </class>
5607         <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">
5608                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5609                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5610                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5611                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5612                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5613                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5614                 </fields>
5615                 <links>
5616                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5617                 </links>
5618         </class>
5619
5620         <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">
5621             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5622                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5623                 <field reporter:label="Code" name="code" reporter:datatype="text" />
5624                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5625                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5626                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5627                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5628         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5629
5630             </fields>
5631             <links>
5632                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5633             </links>
5634             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5635                 <actions>
5636                     <create permission="ADMIN_PROVIDER">
5637                         <context link="provider" field="owner"/>
5638                     </create>
5639                     <retrieve permission="ADMIN_PROVIDER">
5640                         <context link="provider" field="owner"/>
5641                     </retrieve>
5642                     <update permission="ADMIN_PROVIDER">
5643                         <context link="provider" field="owner"/>
5644                     </update>
5645                     <delete permission="ADMIN_PROVIDER">
5646                         <context link="provider" field="owner"/>
5647                     </delete>
5648                 </actions>
5649             </permacrud>
5650         </class>
5651         
5652         <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">
5653             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
5654                 <field reporter:label="ID" name="id" reporter:datatype="id" />
5655                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5656                 <field reporter:label="Name" name="name" reporter:datatype="text" />
5657                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
5658             </fields>
5659             <links>
5660                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5661             </links>
5662             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5663                 <actions>
5664                     <create permission="ADMIN_PROVIDER">
5665                         <context link="provider" field="owner"/>
5666                     </create>
5667                     <retrieve permission="ADMIN_PROVIDER">
5668                         <context link="provider" field="owner"/>
5669                     </retrieve>
5670                     <update permission="ADMIN_PROVIDER">
5671                         <context link="provider" field="owner"/>
5672                     </update>
5673                     <delete permission="ADMIN_PROVIDER">
5674                         <context link="provider" field="owner"/>
5675                     </delete>
5676                 </actions>
5677             </permacrud>
5678         </class>
5679         
5680         <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">
5681             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5682                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5683                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5684                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5685                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5686                 </fields>
5687                 <links/>
5688         </class>
5689
5690         <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">
5691                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
5692                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID"/>
5693                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
5694                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
5695                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
5696                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
5697                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
5698                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
5699                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
5700                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
5701                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
5702                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
5703                 </fields>
5704                 <links>
5705                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5706                 </links>
5707         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5708             <actions>
5709                 <create permission="ADMIN_PROVIDER">
5710                     <context link="provider" field="owner"/>
5711                 </create>
5712                 <retrieve permission="ADMIN_PROVIDER">
5713                     <context link="provider" field="owner"/>
5714                 </retrieve>
5715                 <update permission="ADMIN_PROVIDER">
5716                     <context link="provider" field="owner"/>
5717                 </update>
5718                 <delete permission="ADMIN_PROVIDER">
5719                     <context link="provider" field="owner"/>
5720                 </delete>
5721             </actions>
5722         </permacrud>
5723         </class>
5724
5725         <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">
5726                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
5727                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
5728                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
5729                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
5730                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
5731                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
5732                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
5733                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
5734                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
5735                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
5736                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
5737                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
5738                 </fields>
5739                 <links>
5740                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
5741                 </links>
5742         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5743             <actions>
5744                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5745                     <context link="account" jump="provider" field="owner"/>
5746                 </retrieve>
5747                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5748                     <context link="account" jump="provider" field="owner"/>
5749                 </update>
5750                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5751                     <context link="account" jump="provider" field="owner"/>
5752                 </delete>
5753             </actions>
5754         </permacrud>
5755         </class>
5756
5757
5758         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
5759                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
5760                         <field name="id" reporter:datatype="id" />
5761                         <field name="parent" reporter:datatype="link"/>
5762                         <field name="owner" reporter:datatype="link"/>
5763                         <field name="create_time" reporter:datatype="timestamp"/>
5764                         <field name="name" reporter:datatype="text"/>
5765                         <field name="shared" reporter:datatype="bool"/>
5766                         <field name="share_with" reporter:datatype="link"/>
5767                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5768                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
5769                 </fields>
5770                 <links>
5771                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5772                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
5773                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
5774                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5775                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
5776                 </links>
5777         </class>
5778         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
5779                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
5780                         <field name="id" reporter:datatype="id" />
5781                         <field name="parent" reporter:datatype="link"/>
5782                         <field name="owner" reporter:datatype="link"/>
5783                         <field name="create_time" reporter:datatype="timestamp"/>
5784                         <field name="name" reporter:datatype="text"/>
5785                         <field name="shared" reporter:datatype="bool"/>
5786                         <field name="share_with" reporter:datatype="link"/>
5787                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5788                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
5789                 </fields>
5790                 <links>
5791                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5792                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
5793                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
5794                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5795                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
5796                 </links>
5797         </class>
5798         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
5799                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
5800                         <field name="id" reporter:datatype="id" />
5801                         <field name="parent" reporter:datatype="link"/>
5802                         <field name="owner" reporter:datatype="link"/>
5803                         <field name="create_time" reporter:datatype="timestamp"/>
5804                         <field name="name" reporter:datatype="text"/>
5805                         <field name="shared" reporter:datatype="bool"/>
5806                         <field name="share_with" reporter:datatype="link"/>
5807                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5808                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
5809                 </fields>
5810                 <links>
5811                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5812                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
5813                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
5814                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5815                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
5816                 </links>
5817         </class>
5818         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
5819                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
5820                         <field name="id" reporter:datatype="id" />
5821                         <field name="owner" reporter:datatype="link"/>
5822                         <field name="create_time" reporter:datatype="timestamp"/>
5823                         <field name="name" reporter:datatype="text"/>
5824                         <field name="data" reporter:datatype="text"/>
5825                         <field name="folder" reporter:datatype="link"/>
5826                         <field name="description" reporter:datatype="text"/>
5827                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
5828                 </fields>
5829                 <links>
5830                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5831                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
5832                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
5833                 </links>
5834         </class>
5835         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
5836                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
5837                         <field name="id" reporter:datatype="id" />
5838                         <field name="owner" reporter:datatype="link"/>
5839                         <field name="create_time" reporter:datatype="timestamp"/>
5840                         <field name="template" reporter:datatype="link"/>
5841                         <field name="data" reporter:datatype="link"/>
5842                         <field name="folder" reporter:datatype="link"/>
5843                         <field name="recur" reporter:datatype="bool"/>
5844                         <field name="recurrence" reporter:datatype="interval"/>
5845                         <field name="name" reporter:datatype="text"/>
5846                         <field name="description" reporter:datatype="text"/>
5847                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
5848                 </fields>
5849                 <links>
5850                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5851                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
5852                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
5853                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
5854                 </links>
5855         </class>
5856         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
5857                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
5858                         <field name="id" reporter:datatype="id" />
5859                         <field name="runner" reporter:datatype="link"/>
5860                         <field name="start_time" reporter:datatype="timestamp"/>
5861                         <field name="complete_time" reporter:datatype="timestamp"/>
5862                         <field name="run_time" reporter:datatype="timestamp"/>
5863                         <field name="email" reporter:datatype="text"/>
5864                         <field name="excel_format" reporter:datatype="bool"/>
5865                         <field name="csv_format" reporter:datatype="bool"/>
5866                         <field name="html_format" reporter:datatype="bool"/>
5867                         <field name="error_code" reporter:datatype="int"/>
5868                         <field name="error_text" reporter:datatype="text"/>
5869                         <field name="report" reporter:datatype="link"/>
5870                         <field name="folder" reporter:datatype="link"/>
5871                         <field name="chart_pie" reporter:datatype="bool"/>
5872                         <field name="chart_bar" reporter:datatype="bool"/>
5873                         <field name="chart_line" reporter:datatype="bool"/>
5874                 </fields>
5875                 <links>
5876                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
5877                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
5878                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
5879                 </links>
5880         </class>
5881         <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">
5882                 <fields oils_persist:primary="id">
5883                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5884                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5885                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5886                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5887                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5888                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5889                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5890                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5891                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5892                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5893                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5894                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5895                 </fields>
5896                 <links>
5897                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5898                 </links>
5899         </class>
5900         <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">
5901                 <fields oils_persist:primary="id">
5902                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5903                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5904                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5905                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5906                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5907                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5908                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5909                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5910                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5911                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5912                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5913                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5914                 </fields>
5915                 <links>
5916                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5917                 </links>
5918         </class>
5919         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
5920                 <fields oils_persist:primary="id">
5921                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5922                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
5923                         <field reporter:label="Fingerprint" name="fingerprint" />
5924                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5925                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5926                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5927                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5928                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
5929                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5930                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5931                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5932                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
5933                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
5934                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
5935                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5936                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5937                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
5938                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
5939                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
5940                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
5941                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
5942                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
5943                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5944                 </fields>
5945                 <links>
5946                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
5947                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5948                 </links>
5949         </class>
5950         <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">
5951                 <fields oils_persist:primary="id">
5952                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
5953                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
5954                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
5955                 </fields>
5956                 <links>
5957                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
5958                 </links>
5959         </class>
5960         <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">
5961                 <fields oils_persist:primary="id">
5962                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
5963                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
5964                 </fields>
5965                 <links>
5966                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
5967                 </links>
5968         </class>
5969         <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">
5970                 <fields oils_persist:primary="id">
5971                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5972                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
5973                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
5974                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
5975                 </fields>
5976                 <links>
5977                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
5978                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
5979                 </links>
5980         </class>
5981         <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">
5982                 <fields oils_persist:primary="xact">
5983                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5984                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
5985                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
5986                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
5987                 </fields>
5988                 <links>
5989                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5990                 </links>
5991         </class>
5992         <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">
5993                 <fields oils_persist:primary="xact">
5994                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5995                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
5996                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
5997                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
5998                 </fields>
5999                 <links>
6000                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6001                 </links>
6002         </class>
6003         <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)">
6004                 <fields oils_persist:primary="id">
6005                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
6006                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
6007                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
6008                 </fields>
6009                 <links>
6010                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6011                 </links>
6012         </class>
6013         <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">
6014                 <fields oils_persist:primary="id">
6015                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
6016                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
6017                 </fields>
6018                 <links>
6019                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
6020                 </links>
6021         </class>
6022         <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">
6023                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
6024                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
6025                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
6026                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
6027                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
6028                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6029                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
6030                 </fields>
6031                 <links>
6032                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6033                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
6034                 </links>
6035                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6036                         <actions>
6037                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6038                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6039                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6040                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6041                         </actions>
6042                 </permacrud>
6043         </class>
6044         <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">
6045                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
6046                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
6047                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
6048                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
6049                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
6050                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6051                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6052                 </fields>
6053                 <links>
6054                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6055                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6056                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6057                 </links>
6058                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6059                         <actions>
6060                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
6061                                         <context link="formula" field="owner"/>
6062                                 </create>
6063                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
6064                                         <context link="formula" field="owner"/>
6065                                 </retrieve>
6066                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
6067                                         <context link="formula" field="owner"/>
6068                                 </update>
6069                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
6070                                         <context link="formula" field="owner"/>
6071                                 </delete>
6072                         </actions>
6073                 </permacrud>
6074         </class>
6075
6076         <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">
6077                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
6078                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6079                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6080                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6081                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
6082                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
6083                 </fields>
6084                 <links>
6085                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6086                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6087                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6088                 </links>
6089                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6090                         <actions>
6091                                 <create permission="CREATE_PURCHASE_ORDER">
6092                                         <context link="formula" field="owner"/>
6093                 </create>
6094                                 <retrieve permission="CREATE_PURCHASE_ORDER">
6095                                         <context link="formula" field="owner"/>
6096                 </retrieve>
6097                                 <update permission="CREATE_PURCHASE_ORDER">
6098                                         <context link="formula" field="owner"/>
6099                 </update>
6100                                 <delete permission="CREATE_PURCHASE_ORDER">
6101                                         <context link="formula" field="owner"/>
6102                 </delete>
6103                         </actions>
6104                 </permacrud>
6105         </class>
6106
6107         <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">
6108                 <fields oils_persist:primary="id">
6109                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
6110                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6111                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
6112                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
6113                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
6114                 </fields>
6115                 <links>
6116                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6117                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6118                 </links>
6119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6120                 </permacrud>
6121         </class>
6122
6123         <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">
6124                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
6125                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id"/>
6126                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6127                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6128                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6129                 </fields>
6130                 <links>
6131                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6132                 </links>
6133                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6134                 </permacrud>
6135         </class>
6136
6137         <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">
6138                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
6139                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id"/>
6140                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6141                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6142                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6143                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
6144                 </fields>
6145                 <links>
6146                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6147                 </links>
6148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6149                 </permacrud>
6150         </class>
6151
6152         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
6153                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
6154                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
6155                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
6156                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
6157                 </fields>
6158                 <links>
6159                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
6160                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
6161                 </links>
6162                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6163                 </permacrud>
6164         </class>
6165
6166         <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">
6167                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
6168                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
6169                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
6170                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
6171                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
6172                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6173                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6174                 </fields>
6175                 <links>
6176                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
6177                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
6178                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6179                 </links>
6180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6181                 </permacrud>
6182         </class>
6183
6184         <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">
6185                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
6186                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6187                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6188                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
6189                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6190                 </fields>
6191                 <links>
6192                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6193                 </links>
6194                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6195             <actions>
6196                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6197                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
6198                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6199                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6200             </actions>
6201                 </permacrud>
6202         </class>
6203
6204         <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">
6205                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
6206                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
6207                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
6208                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
6209                         <field reporter:label="Action" name="action" reporter:datatype="link"/>
6210                 </fields>
6211                 <links>
6212                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6213                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
6214                 </links>
6215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6216                         <actions>
6217                                 <create permission="ADMIN_CLAIM_POLICY">
6218                                         <context link="claim_policy" field="org_unit"/>
6219                 </create>
6220                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
6221                                         <context link="claim_policy" field="org_unit"/>
6222                 </retrieve>
6223                                 <update permission="ADMIN_CLAIM_POLICY">
6224                                         <context link="claim_policy" field="org_unit"/>
6225                 </update>
6226                                 <delete permission="ADMIN_CLAIM_POLICY">
6227                                         <context link="claim_policy" field="org_unit"/>
6228                 </delete>
6229                         </actions>
6230                 </permacrud>
6231         </class>
6232
6233     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
6234         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
6235             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6236             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6237             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6238             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
6239             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6240             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
6241             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
6242             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
6243             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
6244             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
6245             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
6246             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
6247             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
6248             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
6249             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6250         </fields>
6251     </class>
6252
6253     <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">
6254         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
6255             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6256             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6257             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6258             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6259             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6260         </fields>
6261     </class>
6262
6263     <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">
6264         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
6265             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6266             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6267             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6268             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6269             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6270             <field reporter:label="City" name="city" reporter:datatype="text"/>
6271             <field reporter:label="State" name="state" reporter:datatype="text"/>
6272             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6273             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6274             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6275         </fields>
6276     </class>
6277
6278     <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">
6279         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
6280             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6281             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6282             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6283             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6284             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6285             <field reporter:label="City" name="city" reporter:datatype="text"/>
6286             <field reporter:label="State" name="state" reporter:datatype="text"/>
6287             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6288             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6289             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6290         </fields>
6291     </class>
6292
6293     <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">
6294         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
6295             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6296             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6297             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6298             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
6299             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
6300             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6301         </fields>
6302     </class>
6303
6304     <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">
6305         <fields>
6306             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6307             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6308             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6309         </fields>
6310                 <links>
6311                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6312                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6313                 </links>
6314     </class>
6315
6316     <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">
6317         <fields>
6318             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6319             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
6320         </fields>
6321                 <links>
6322                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6323                 </links>
6324     </class>
6325
6326     <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">
6327         <fields>
6328             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6329             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6330             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6331         </fields>
6332                 <links>
6333                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6334                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6335                 </links>
6336     </class>
6337
6338     <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">
6339         <fields>
6340             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6341             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
6342         </fields>
6343                 <links>
6344                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6345                 </links>
6346     </class>
6347
6348     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
6349                 <oils_persist:source_definition>
6350
6351             SELECT  DISTINCT l.*
6352               FROM  action.unfulfilled_hold_loops l
6353                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
6354               WHERE l.count = m.max
6355
6356                 </oils_persist:source_definition>
6357         <fields>
6358             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6359             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6360             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6361         </fields>
6362                 <links>
6363                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6364                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6365                 </links>
6366     </class>
6367
6368         <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">
6369                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
6370                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
6371                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
6372                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
6373                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
6374                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="int"/>
6375                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="int"/>
6376                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="int"/>
6377                 </fields>
6378                 <links>
6379                 </links>
6380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6381                 </permacrud>
6382         </class>
6383
6384         <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">
6385                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
6386                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
6387                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
6388                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6389                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
6390                 </fields>
6391                 <links>
6392                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
6393                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
6394                 </links>
6395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6396                 </permacrud>
6397         </class>
6398
6399         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
6400                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
6401                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
6402                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
6403                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
6404                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
6405                 </fields>
6406                 <links>
6407                 </links>
6408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6409                 </permacrud>
6410         </class>
6411
6412         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
6413                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
6414                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
6415                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
6416                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6417                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
6418                 </fields>
6419                 <links>
6420                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
6421                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
6422                 </links>
6423                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6424                 </permacrud>
6425         </class>
6426         
6427         <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">
6428                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
6429                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
6430                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
6431                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
6432                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
6433                 </fields>
6434                 <links>
6435                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
6436                 </links>
6437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6438                 </permacrud>
6439         </class>
6440         
6441         <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">
6442                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
6443                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
6444                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6445                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6446                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
6447                 </fields>
6448                 <links>
6449                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6450                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
6451                 </links>
6452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6453                 </permacrud>
6454         </class>
6455
6456         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
6457                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6458                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6459                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
6460                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6461                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6462                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6463                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6464                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6465                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6466                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6467                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6468                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6469                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6470                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6471                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
6472                 </fields>
6473                 <links>
6474                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6475                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
6476                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
6477                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6478                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
6479                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
6480                 </links>
6481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6482                 </permacrud>
6483         </class>
6484
6485         <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">
6486                 <fields oils_persist:primary="id" oils_persist:sequence="case_branch_id_seq">
6487                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
6488                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6489                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6490                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
6491                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
6492                 </fields>
6493                 <links>
6494                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6495                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
6496                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
6497                 </links>
6498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6499                 </permacrud>
6500         </class>
6501
6502         <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">
6503                 <fields oils_persist:primary="id" oils_persist:sequence="from_relation_id_seq">
6504                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
6505                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
6506                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
6507                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
6508                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
6509                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
6510                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6511                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
6512                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6513                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
6514                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
6515                 </fields>
6516                 <links>
6517                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
6518                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
6519                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
6520                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
6521                 </links>
6522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6523                 </permacrud>
6524         </class>
6525
6526         <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">
6527                 <fields oils_persist:primary="id" oils_persist:sequence="record_column_id_seq">
6528                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
6529                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
6530                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6531                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6532                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
6533                 </fields>
6534                 <links>
6535                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
6536                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
6537                 </links>
6538                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6539                 </permacrud>
6540         </class>
6541
6542         <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">
6543                 <fields oils_persist:primary="id" oils_persist:sequence="select_item_id_seq">
6544                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
6545                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
6546                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6547                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
6548                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
6549                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
6550                 </fields>
6551                 <links>
6552                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6553                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
6554                 </links>
6555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6556                 </permacrud>
6557         </class>
6558
6559         <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">
6560                 <fields oils_persist:primary="id" oils_persist:sequence="order_by_item_id_seq">
6561                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
6562                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
6563                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6564                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
6565                 </fields>
6566                 <links>
6567                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6568                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
6569                 </links>
6570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6571                 </permacrud>
6572         </class>
6573
6574         <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">
6575                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6576                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6577                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6578                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6579                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6580                 </fields>
6581                 <links>
6582                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6583                 </links>
6584                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6585                 </permacrud>
6586         </class>
6587
6588         <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">
6589                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6590                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6591                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6592                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6593                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6594                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6595                 </fields>
6596                 <links>
6597                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6598                 </links>
6599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6600                 </permacrud>
6601         </class>
6602
6603         <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">
6604                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6605                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6606                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6607                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6608                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6609                 </fields>
6610                 <links>
6611                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6612                 </links>
6613                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6614                 </permacrud>
6615         </class>
6616
6617         <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">
6618                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6619                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6620                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6621                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6622                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6623                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6624                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
6625                 </fields>
6626                 <links>
6627                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6628                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
6629                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
6630                 </links>
6631                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6632                 </permacrud>
6633         </class>
6634
6635         <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">
6636                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6637                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6638                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6639                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6640                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6641                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6642                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6643                 </fields>
6644                 <links>
6645                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6646                 </links>
6647                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6648                 </permacrud>
6649         </class>
6650
6651         <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">
6652                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6653                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6654                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6655                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6656                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6657                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6658                 </fields>
6659                 <links>
6660                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6661                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
6662                 </links>
6663                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6664                 </permacrud>
6665         </class>
6666
6667         <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">
6668                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6669                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6670                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6671                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6672                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6673                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6674                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6675                 </fields>
6676                 <links>
6677                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6678                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
6679                 </links>
6680                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6681                 </permacrud>
6682         </class>
6683
6684         <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">
6685                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6686                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6687                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6688                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6689                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6690                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6691                 </fields>
6692                 <links>
6693                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6694                         <link field="function_id" reltype="might_have" key="id" map="" class="qfs"/>
6695                 </links>
6696                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6697                 </permacrud>
6698         </class>
6699
6700         <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">
6701                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6702                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6703                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6704                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6705                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6706                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6707                 </fields>
6708                 <links>
6709                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6710                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6711                 </links>
6712                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6713                 </permacrud>
6714         </class>
6715
6716         <class id="xnbet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnbet" oils_persist:tablename="query.expr_xnbet" reporter:label="Not Between Expression">
6717                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6718                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6719                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6720                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6721                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6722                 </fields>
6723                 <links>
6724                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6725                 </links>
6726                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6727                 </permacrud>
6728         </class>
6729
6730         <class id="xnex" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnex" oils_persist:tablename="query.expr_xnex" reporter:label="Not Exists Expression">
6731                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6732                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6733                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6734                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6735                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6736                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6737                 </fields>
6738                 <links>
6739                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6740                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6741                 </links>
6742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6743                 </permacrud>
6744         </class>
6745
6746         <class id="xnin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnin" oils_persist:tablename="query.expr_xnin" reporter:label="Not In Expression">
6747                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6748                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6749                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6750                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6751                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6752                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6753                 </fields>
6754                 <links>
6755                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6756                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6757                 </links>
6758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6759                 </permacrud>
6760         </class>
6761
6762         <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">
6763                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6764                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6765                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6766                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6767                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6768                 </fields>
6769                 <links>
6770                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6771                 </links>
6772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6773                 </permacrud>
6774         </class>
6775
6776         <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">
6777                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6778                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6779                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6780                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6781                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6782                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6783                 </fields>
6784                 <links>
6785                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6786                 </links>
6787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6788                 </permacrud>
6789         </class>
6790
6791         <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">
6792                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6793                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6794                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6795                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6796                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6797                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6798                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6799                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6800                 </fields>
6801                 <links>
6802                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6803                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6804                         <link field="right_operand" reltype="might_have" key="id" map="" class="qxp"/>
6805                 </links>
6806                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6807                 </permacrud>
6808         </class>
6809
6810         <class id="xstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_string" oils_persist:tablename="query.expr_string" reporter:label="String Expression">
6811                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6812                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6813                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6814                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6815                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6816                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6817                 </fields>
6818                 <links>
6819                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6820                 </links>
6821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6822                 </permacrud>
6823         </class>
6824
6825         <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">
6826                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6827                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6828                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6829                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6830                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6831                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6832                 </fields>
6833                 <links>
6834                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6835                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6836                 </links>
6837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6838                 </permacrud>
6839         </class>
6840
6841         <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">
6842                 <fields oils_persist:primary="id">
6843                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
6844                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
6845                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
6846                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
6847                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6848                 </fields>
6849                 <links>
6850                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
6851                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
6852                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
6853                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6854                 </links>
6855         </class>
6856
6857         <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">
6858                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
6859                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6860                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
6861                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
6862                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
6863                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
6864                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
6865                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
6866                 </fields>
6867                 <links/>
6868                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6869                         <actions>
6870                                 <retrieve/>
6871                         </actions>
6872                 </permacrud>
6873         </class>
6874
6875         <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">
6876                 <fields oils_persist:primary="ptype_key">
6877                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
6878                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6879                 </fields>
6880                 <links/>
6881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6882                         <actions>
6883                                 <retrieve/>
6884                         </actions>
6885                 </permacrud>
6886         </class>
6887
6888         <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">
6889                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
6890                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6891                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
6892                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
6893                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
6894                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
6895                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6896                 </fields>
6897                 <links>
6898                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
6899                 </links>
6900                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6901                         <actions>
6902                                 <retrieve/>
6903                         </actions>
6904                 </permacrud>
6905         </class>
6906
6907         <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">
6908                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
6909                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6910                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6911                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
6912                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6913                 </fields>
6914                 <links>
6915                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
6916                 </links>
6917                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6918                         <actions>
6919                                 <retrieve/>
6920                         </actions>
6921                 </permacrud>
6922         </class>
6923
6924         <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">
6925                 <fields oils_persist:primary="code">
6926                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
6927                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
6928                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
6929                 </fields>
6930                 <links/>
6931                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6932                         <actions>
6933                                 <retrieve/>
6934                         </actions>
6935                 </permacrud>
6936         </class>
6937
6938         <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">
6939                 <oils_persist:source_definition>
6940
6941             SELECT  b.id,
6942                     MAX(dcp.edit_date) AS last_delete_date
6943              FROM   biblio.record_entry b
6944                     JOIN asset.call_number cn ON (cn.record = b.id)
6945                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
6946              WHERE  NOT b.deleted
6947              GROUP BY b.id
6948              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
6949
6950                 </oils_persist:source_definition>
6951                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
6952                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
6953                         <field reporter:label="Delete Date/Time" name="copy_delete_date" reporter:datatype="timestamp"/>
6954                 </fields>
6955                 <links>
6956                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6957                 </links>
6958                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6959                         <actions>
6960                                 <retrieve/>
6961                         </actions>
6962                 </permacrud>
6963         </class>
6964
6965
6966         <!-- ********************************************************************************************************************* -->
6967         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
6968         <!-- ********************************************************************************************************************* -->
6969         <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">
6970                 <fields oils_persist:primary="id">
6971                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
6972                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
6973                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
6974                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6975                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
6976                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
6977                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
6978                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
6979                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
6980                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
6981                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
6982                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
6983                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
6984                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
6985                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
6986                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
6987                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
6988                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
6989                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
6990                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
6991                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
6992                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
6993                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
6994                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
6995                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
6996                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
6997                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
6998                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
6999                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
7000                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
7001                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
7002                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
7003                 </fields>
7004                 <links>
7005                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7006                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
7007                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
7008                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
7009                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7010                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
7011                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
7012                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
7013                 </links>
7014         </class>
7015
7016         <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">
7017                 <fields oils_persist:primary="id">
7018                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7019                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7020                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7021                 </fields>
7022                 <links>
7023                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7024                 </links>
7025         </class>
7026
7027         <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">
7028                 <fields oils_persist:primary="id">
7029                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7030                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7031                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7032                 </fields>
7033                 <links>
7034                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7035                 </links>
7036         </class>
7037
7038         <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">
7039                 <fields oils_persist:primary="id">
7040                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7041
7042                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
7043                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
7044                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
7045
7046                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
7047                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
7048                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
7049
7050                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
7051                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
7052
7053                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7054                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7055                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
7056
7057                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
7058                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
7059
7060                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
7061                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
7062                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
7063
7064                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
7065                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
7066                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
7067
7068                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
7069                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
7070                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
7071                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
7072
7073                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
7074                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
7075
7076                 </fields>
7077                 <links>
7078                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
7079                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7080                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7081                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7082                 </links>
7083         </class>
7084
7085         <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">
7086                 <oils_persist:source_definition>
7087
7088             SELECT
7089                 po.ordering_agency AS ordering_agency,
7090                 po.id AS purchase_order,
7091                 li.id AS lineitem,
7092                 lid.id AS lineitem_detail,
7093                 cpa.id AS claim_policy_action
7094             FROM
7095                 acq.lineitem_detail lid
7096                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
7097                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
7098                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
7099                 JOIN acq.claim_policy_action cpa ON (
7100                     cpa.claim_policy = cp.id
7101
7102                     -- we only care about claim policy actions whose claim
7103                     -- interval we'd reached or exceeded
7104                     AND (NOW() - cpa.action_interval) &gt; po.order_date
7105
7106                     -- filter out all claim policy actions where claim events
7107                     -- have occurred on or after the action's action_interval
7108                     AND NOT EXISTS (
7109                         SELECT 1
7110                         FROM
7111                             acq.claim_event evt
7112                             JOIN acq.claim claim ON (
7113                                 claim.id = evt.claim
7114                                 AND claim.lineitem_detail = lid.id
7115                             )
7116                         WHERE
7117                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
7118                     )
7119                 )
7120             WHERE
7121                 lid.cancel_reason IS NULL
7122                 AND li.cancel_reason IS NULL -- belt/suspenders
7123                 AND po.cancel_reason IS NULL -- belt/suspenders
7124                 AND lid.recv_time IS NULL
7125                 AND po.state = 'on-order'
7126             ORDER BY 1, 2, 3, 4, 5
7127
7128                 </oils_persist:source_definition>
7129                 <fields>
7130                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7131                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7132                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7133                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7134                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
7135                 </fields>
7136                 <links>
7137                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7138                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7139                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7140                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7141                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
7142                 </links>
7143         </class>
7144
7145
7146         <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">
7147                 <oils_persist:source_definition>
7148
7149                         SELECT  t.*
7150                           FROM  action.transit_copy t
7151                                 JOIN actor.org_unit AS s ON (t.source = s.id)
7152                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
7153                           WHERE s.parent_ou &lt;&gt; d.parent_ou
7154
7155                 </oils_persist:source_definition>
7156                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7157                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
7158                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
7159                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7160                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
7161                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
7162                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
7163                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
7164                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7165                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7166                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7167                 </fields>
7168                 <links>
7169                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
7170                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7171                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7172                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7173                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7174                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
7175                 </links>
7176         </class>
7177
7178     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
7179                 <oils_persist:source_definition>
7180
7181         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
7182                 SELECT
7183                         cp.id as copy,
7184                         COUNT(circ.id),
7185                         EXTRACT(YEAR FROM circ.xact_start) AS year,
7186                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
7187                 FROM
7188                         asset.copy cp
7189                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
7190                 GROUP BY 1, 3, 4
7191                 UNION
7192                 SELECT
7193                         cp.id as copy,
7194                         COUNT(circ.id),
7195                         EXTRACT(YEAR FROM circ.xact_start) AS year,
7196                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
7197                 FROM
7198                         asset.copy cp
7199                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
7200                 GROUP BY 1, 3, 4
7201                 UNION
7202                 SELECT
7203                         id as copy,
7204                         circ_count,
7205                         -1 AS year,
7206                         false as is_renewal
7207                 FROM
7208                         extend_reporter.legacy_circ_count
7209         )x GROUP BY 1, 3, 4
7210
7211                 </oils_persist:source_definition>
7212         <fields>
7213             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
7214             <field reporter:label="Count" name="count" reporter:datatype="int"/>
7215             <field reporter:label="Year" name="year" reporter:datatype="int"/>
7216             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
7217         </fields>
7218                 <links>
7219                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7220                 </links>
7221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7222                         <actions>
7223                                 <retrieve/>
7224                         </actions>
7225                 </permacrud>
7226     </class>
7227
7228         <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">
7229                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7230                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
7231                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
7232                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
7233                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7234                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
7235                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
7236                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
7237                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
7238                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
7239                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
7240                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
7241                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
7242                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
7243                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
7244                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
7245                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
7246                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
7247                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
7248                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
7249                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
7250                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
7251                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
7252                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
7253                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
7254                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7255                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7256                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7257                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
7258                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
7259                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
7260                 </fields>
7261                 <links>
7262                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7263                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
7264                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
7265                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7266                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
7267                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7268                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7269                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7270                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7271                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7272                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7273                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7274                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
7275                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7276                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7277                 </links>
7278         </class>
7279
7280     <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">
7281         <fields oils_persist:primary="id">
7282             <field reporter:label="Title" name="title" reporter:datatype="text"/>
7283             <field reporter:label="Author" name="author" reporter:datatype="text"/>
7284             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
7285             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7286             <field reporter:label="Price" name="price" reporter:datatype="money"/>
7287             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7288             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
7289             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
7290             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
7291             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
7292             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
7293             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
7294             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
7295             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
7296             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
7297             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
7298             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7299             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7300             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
7301             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
7302             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
7303             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
7304             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7305             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
7306             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7307             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
7308             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
7309             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
7310             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
7311             <field reporter:label="Status" name="status" reporter:datatype="link"/>
7312             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
7313             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
7314             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
7315             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
7316         </fields>
7317         <links>
7318             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7319             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7320             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7321             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7322             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7323         </links>
7324     </class>
7325
7326     <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">
7327         <fields oils_persist:primary="id">
7328             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7329             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7330             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7331             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7332         </fields>
7333         <links>
7334             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7335             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7336         </links>
7337     </class>
7338
7339     <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">
7340         <fields oils_persist:primary="owning_lib">
7341             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7342             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7343             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7344         </fields>
7345         <links>
7346             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7347         </links>
7348     </class>
7349
7350     <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">
7351         <fields oils_persist:primary="id">
7352             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7353             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7354             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7355             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7356             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7357         </fields>
7358         <links>
7359             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7360             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7361             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7362         </links>
7363     </class>
7364
7365     <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">
7366         <fields oils_persist:primary="circ_lib">
7367             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7368             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7369             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7370             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7371         </fields>
7372         <links>
7373             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7374             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7375         </links>
7376     </class>
7377
7378     <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">
7379         <fields oils_persist:primary="id">
7380             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7381             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7382             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7383             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7384             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7385         </fields>
7386         <links>
7387             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7388             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7389             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7390         </links>
7391     </class>
7392
7393     <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">
7394         <fields oils_persist:primary="home_ou">
7395             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7396             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7397             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7398             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7399         </fields>
7400         <links>
7401             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7402             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7403         </links>
7404     </class>
7405         <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">
7406                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
7407                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
7408                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
7409                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
7410                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7411                 </fields>
7412                 <links>
7413                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7414                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
7415                 </links>
7416                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7417                         <actions>
7418                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7419                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
7420                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7421                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7422                         </actions>
7423                 </permacrud>
7424         </class>
7425         <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">
7426                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
7427                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
7428                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
7429                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
7430                 </fields>
7431                 <links>
7432                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7433                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
7434                         </links>
7435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7436                 <actions>
7437                                 <create permission="ADMIN_ACQ_FUND_TAG">
7438                                         <context link="tag" field="owner"/>
7439                                 </create>
7440                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7441                                         <context link="tag" field="owner"/>
7442                                 </retrieve>
7443                                 <update permission="ADMIN_ACQ_FUND_TAG">
7444                                         <context link="tag" field="owner"/>
7445                                 </update>
7446                                 <delete permission="ADMIN_ACQ_FUND_TAG">
7447                                         <context link="tag" field="owner"/>
7448                                 </delete>
7449                         </actions>
7450                 </permacrud>
7451         </class>
7452
7453         <!-- ********************************************************************************************************************* -->
7454
7455 </IDL>
7456
7457 <!--
7458     vim:noet:ts=4:sw=4:
7459 -->