]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
added pcrud entries for po notes
[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="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">
134                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
135                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
136                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
137                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
138                 </fields>
139                 <links>
140                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
141                 </links>
142                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
143                         <actions>
144                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
145                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
146                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
147                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
148                         </actions>
149                 </permacrud>
150         </class>
151
152         <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">
153                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
154                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
155                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
156                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
157                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
158                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
159                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
160                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
161                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
162                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
163                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
164                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
165                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
166                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
167                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
168                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
169                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
170                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
171                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
172                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
173                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
174                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
175                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
176                 </fields>
177                 <links>
178                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
179                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
180                 </links>
181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
182                         <actions>
183                                 <create permission="CREATE_IMPORT_ITEM">
184                     <context link="definition" field="owner"/>
185                                 </create>
186                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
187                     <context link="definition" field="owner"/>
188                                 </retrieve>
189                                 <update permission="UPDATE_IMPORT_ITEM">
190                     <context link="definition" field="owner"/>
191                                 </update>
192                                 <delete permission="DELETE_IMPORT_ITEM">
193                     <context link="definition" field="owner"/>
194                                 </delete>
195                         </actions>
196                 </permacrud>
197         </class>
198
199         <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">
200                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
201                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
202                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
203                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
204                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
205                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
206                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
207                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
208                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
209                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
210                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
211                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
212                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
213                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
214                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
215                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
216                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
217                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
218                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
219                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
220                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
221                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
222                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
223                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
224                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
225                 </fields>
226                 <links>
227                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
228                 </links>
229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
230                         <actions>
231                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
232                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
233                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
234                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
235                         </actions>
236                 </permacrud>
237         </class>
238
239         <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">
240                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
241                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
242                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
243                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
244                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
245                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
246                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
247                 </fields>
248                 <links>
249                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
250                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
251                 </links>
252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
253                         <actions>
254                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
255                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
256                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
257                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
258                         </actions>
259                 </permacrud>
260         </class>
261
262         <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">
263                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
264                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
265                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
266                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
267                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
268                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
269                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
270                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
271                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
272                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
273                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
274                 </fields>
275                 <links>
276                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
277                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
278                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
279             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
280             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
281                 </links>
282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
283                         <actions>
284                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
285                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
286                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
287                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
288                         </actions>
289                 </permacrud>
290         </class>
291
292         <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">
293                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
294                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
295                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
296                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
297                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
298                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
299                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
300                 </fields>
301                 <links/>
302                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
303                         <actions>
304                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
305                 <retrieve/>
306                 <!--
307                                 <retrieve permission="CREATE_BIB_IMPORT_IMPORT_FIELD_DEF UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
308                 -->
309                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
310                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
311                         </actions>
312                 </permacrud>
313         </class>
314
315         <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">
316                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
317                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
318                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
319                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
320                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
321                 </fields>
322                 <links>
323                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
324                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
325                 </links>
326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
327                         <actions>
328                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
329                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
330                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
331                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
332                         </actions>
333                 </permacrud>
334         </class>
335
336         <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">
337                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
338                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
339                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
340                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
341                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
342                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
343                 </fields>
344                 <links>
345                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
346                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
347                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
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="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">
360                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
361                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
362                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
363                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
364                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
365                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
366                 </fields>
367                 <links>
368                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
369                 </links>
370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
371                         <actions>
372                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
373                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
374                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
375                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
376                         </actions>
377                 </permacrud>
378         </class>
379
380         <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">
381                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
382                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
383                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
384                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
385                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
386                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
387                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
388                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
389                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
390                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
391                 </fields>
392                 <links>
393                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
394                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
395             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
396             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
397                 </links>
398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
399                         <actions>
400                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
401                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
402                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
403                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
404                         </actions>
405                 </permacrud>
406         </class>
407
408         <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">
409                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
410                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
411                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
412                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
413                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
414                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
415                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
416                 </fields>
417                 <links/>
418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
419                         <actions>
420                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
421                 <retrieve/>
422                 <!--
423                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
424                 -->
425                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
426                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
427                         </actions>
428                 </permacrud>
429         </class>
430
431         <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">
432                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
433                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
434                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
435                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
436                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
437                 </fields>
438                 <links>
439                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
440                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
441                 </links>
442                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
443                         <actions>
444                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
445                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
446                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
447                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
448                         </actions>
449                 </permacrud>
450         </class>
451
452         <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">
453                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
454                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
455                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
456                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
457                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
458                 </fields>
459                 <links>
460                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
461                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
462                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
463                 </links>
464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
465                         <actions>
466                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
467                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
470                         </actions>
471                 </permacrud>
472         </class>
473
474
475         <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">
476                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
477                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
478                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
479                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
480                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
481                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
482                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
483                 </fields>
484                 <links>
485                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
486                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
487                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
488                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
489                 </links>
490         </class>
491
492     <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">
493         <fields oils_persist:primary="id">
494             <field reporter:label="ID" name="id" reporter:datatype="id"/>
495             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
496             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
497             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
498             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
499         </fields>
500         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
501             <actions>
502                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
503                 <retrieve/>
504                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
505                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
506             </actions>
507         </permacrud>
508     </class>
509
510         <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">
511                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
512                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
513                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
514                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
515                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
516                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
517                 </fields>
518                 <links>
519                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
520                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
521                 </links>
522         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
523             <actions>
524                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
525                 <retrieve/>
526                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
527                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
528             </actions>
529         </permacrud>
530         </class>
531
532         <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">
533                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
534                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
535                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
536                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
537                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
538                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
539                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
540                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
541                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
542                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
543                 </fields>
544                 <links>
545                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
546                 </links>
547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
548             <actions>
549                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
550                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
551                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
552                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
553             </actions>
554         </permacrud>
555         </class>
556
557     <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">
558         <fields oils_persist:primary="name">
559             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
560             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
561             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
562             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
563             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
564             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
565             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
566             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
567             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
568         </fields>
569         <links>
570             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
571         </links>
572         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
573             <actions>
574                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
575                 <retrieve/>
576                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
577                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
578             </actions>
579         </permacrud>
580     </class>
581
582     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
583         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
584             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
585             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
586             <field reporter:label="Name" name="name" reporter:datatype="text"/>
587             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
588             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
589             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
590             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
591         </fields>
592         <links>
593             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
594         </links>
595     </class>
596
597         <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">
598                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
599                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
600                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
601                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
602                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
603                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
604                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
605                 </fields>
606                 <links>
607             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
608             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
609                 </links>
610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
611                         <actions>
612                                 <retrieve/>
613                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
614                         </actions>
615                 </permacrud>
616         </class>
617
618         <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">
619                 <fields oils_persist:primary="key">
620                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
621                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
622                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
623                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
624                 </fields>
625                 <links/>
626                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
627                         <actions>
628                                 <create permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
629                                 <retrieve/>
630                                 <update permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
631                                 <delete permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
632                         </actions>
633                 </permacrud>
634         </class>
635
636         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
637                 <fields oils_persist:primary="module">
638                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
639                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
640                 </fields>
641                 <links/>
642         </class>
643
644         <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">
645                 <fields oils_persist:primary="module">
646                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
647                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
648                 </fields>
649                 <links/>
650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
651                         <actions>
652                                 <create permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
653                                 <retrieve/>
654                                 <update permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
655                                 <delete permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
656                         </actions>
657                 </permacrud>
658         </class>
659
660         <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">
661                 <fields oils_persist:primary="module">
662                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
663                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
664                 </fields>
665                 <links/>
666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
667                         <actions>
668                                 <create permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
669                                 <retrieve/>
670                                 <update permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
671                                 <delete permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
672                         </actions>
673                 </permacrud>
674         </class>
675
676         <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">
677                 <fields oils_persist:primary="module">
678                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
679                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
680                 </fields>
681                 <links/>
682                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
683                         <actions>
684                                 <create permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
685                                 <retrieve/>
686                                 <update permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
687                                 <delete permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
688                         </actions>
689                 </permacrud>
690         </class>
691
692         <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">
693                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
694                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
695                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
696                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
697                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
698                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
699                 </fields>
700                 <links>
701                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
702                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
703                 </links>
704                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
705                         <actions>
706                                 <create permission="ADMIN_TRIGGER_EVENT_DEF">
707                     <context link="event_def" field="owner"/>
708                 </create>
709                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF">
710                     <context link="event_def" field="owner"/>
711                 </retrieve>
712                                 <update permission="ADMIN_TRIGGER_EVENT_DEF">
713                     <context link="event_def" field="owner"/>
714                 </update>
715                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF">
716                     <context link="event_def" field="owner"/>
717                 </delete>
718                         </actions>
719                 </permacrud>
720         </class>
721
722         <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">
723                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
724                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
725                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
726                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
727                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
728                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
729                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
730                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
731                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
732                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
733                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
734                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
735                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
736                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
737                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
738                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
739                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
740                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
741                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
742                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
743                 </fields>
744                 <links>
745                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
746                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
747                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
748                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
749                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
750                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
751                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
752                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
753                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
754                 </links>
755                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756                         <actions>
757                                 <create permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
758                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
759                                 <update permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
760                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
761                         </actions>
762                 </permacrud>
763         </class>
764
765         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
766                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
767                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
768                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
769                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
770                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
771                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
772                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
773                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
774                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
775                         <field reporter:label="State" name="state" reporter:datatype="text"/>
776                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
777                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
778                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
779                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
780                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
781                 </fields>
782                 <links>
783                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
784                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
785                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
786                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
787                 </links>
788         </class>
789
790         <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">
791                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
792                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
793                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
794                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
795                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
796                 </fields>
797                 <links>
798                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
799                 </links>
800                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
801                         <actions>
802                                 <create permission="ADMIN_TRIGGER_EVENT_DEF">
803                     <context link="event_def" field="owner"/>
804                 </create>
805                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF">
806                     <context link="event_def" field="owner"/>
807                 </retrieve>
808                                 <update permission="ADMIN_TRIGGER_EVENT_DEF">
809                     <context link="event_def" field="owner"/>
810                 </update>
811                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF">
812                     <context link="event_def" field="owner"/>
813                 </delete>
814                         </actions>
815                 </permacrud>
816         </class>
817
818         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
819                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
820                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
821                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
822                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
823                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
824                 </fields>
825                 <links>
826                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
827                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
828                 </links>
829         </class>
830
831         <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">
832                 <fields oils_persist:primary="code">
833                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
834                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
835                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
836                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
837                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
838                 </fields>
839                 <links/>
840         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
841             <actions>
842                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
843                 <retrieve/>
844                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
845                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
846             </actions>
847         </permacrud>
848         </class>
849
850         <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">
851                 <fields oils_persist:primary="code">
852                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
853                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
854                 </fields>
855                 <links/>
856         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
857             <actions>
858                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
859                 <retrieve/>
860                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
861                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
862             </actions>
863         </permacrud>
864         </class>
865
866         <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">
867                 <fields oils_persist:primary="code">
868                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
869                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
870                 </fields>
871                 <links/>
872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
873             <actions>
874                 <create permission="CREATE_INVOICE_METHOD" global_required="true"/>
875                 <retrieve/>
876                 <update permission="UPDATE_INVOICE_METHOD" global_required="true"/>
877                 <delete permission="DELETE_INVOICE_METHOD" global_required="true"/>
878             </actions>
879         </permacrud>
880         </class>
881
882         <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">
883                 <fields oils_persist:primary="code">
884                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
885                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
886                 </fields>
887                 <links/>
888         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
889             <actions>
890                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
891                 <retrieve permission="CREATE_COPY_BTYPE UPDATE_COPY_BTYPE DELETE_COPY_BTYPE" global_required="true"/>
892                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
893                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
894             </actions>
895         </permacrud>
896         </class>
897
898         <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">
899                 <fields oils_persist:primary="code">
900                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
901                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
902                 </fields>
903                 <links/>
904         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
905             <actions>
906                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
907                 <retrieve permission="CREATE_CN_BTYPE UPDATE_CN_BTYPE DELETE_CN_BTYPE" global_required="true"/>
908                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
909                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
910             </actions>
911         </permacrud>
912         </class>
913
914         <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">
915                 <fields oils_persist:primary="code">
916                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
917                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
918                 </fields>
919                 <links/>
920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
921             <actions>
922                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
923                 <retrieve permission="CREATE_BIB_BTYPE UPDATE_BIB_BTYPE DELETE_BIB_BTYPE" global_required="true"/>
924                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
925                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
926             </actions>
927         </permacrud>
928         </class>
929
930         <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">
931                 <fields oils_persist:primary="code">
932                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
933                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
934                 </fields>
935                 <links/>
936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
937             <actions>
938                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
939                 <retrieve permission="CREATE_USER_BTYPE UPDATE_USER_BTYPE DELETE_USER_BTYPE" global_required="true"/>
940                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
941                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
942             </actions>
943         </permacrud>
944         </class>
945
946         <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">
947                 <fields oils_persist:primary="code">
948                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
949                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
950                 </fields>
951                 <links/>
952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
953             <actions>
954                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
955                 <retrieve/>
956                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
957                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
958             </actions>
959         </permacrud>
960         </class>
961
962         <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">
963                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
964                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
965                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
966                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
967                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
968                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
969                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
970                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
971                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
972                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
973                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
974                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
975                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
976                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
977                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
978                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
979                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
980                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
981                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
982                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
983                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
984                 </fields>
985                 <links>
986                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
987                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
988                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
989                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
990                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
991                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
992                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
993                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
994                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
995                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
996                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
997                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
998             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
999                 </links>
1000         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1001             <actions>
1002                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1003                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1004                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1005                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1006             </actions>
1007         </permacrud>
1008         </class>
1009
1010         <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">
1011                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1012                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1013                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1014                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1015                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1016                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link"/>
1017                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1018                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1019                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1020                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1021                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1022                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1023                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1024                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1025                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1026                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1027                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1028                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1029                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1030                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1031                 </fields>
1032                 <links>
1033                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1034                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1035                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1036                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1037                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1038                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1039                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1040                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1041                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1042                 </links>
1043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1044             <actions>
1045                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1046                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1047                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1048                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1049             </actions>
1050         </permacrud>
1051         </class>
1052
1053         <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">
1054                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1055                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1056                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1057                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1058                 </fields>
1059                 <links>
1060                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1061                 </links>
1062         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1063             <actions>
1064                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1065                     <context link="matchpoint" field="org_unit"/>
1066                 </create>
1067                 <retrieve/>
1068                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1069                     <context link="matchpoint" field="org_unit"/>
1070                 </update>
1071                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1072                     <context link="matchpoint" field="org_unit"/>
1073                 </delete>
1074             </actions>
1075         </permacrud>
1076         </class>
1077
1078         <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">
1079                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1080                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1081                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1082                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1083                 </fields>
1084                 <links>
1085                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1086                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1087                 </links>
1088         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1089             <actions>
1090                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1091                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1092                 </create>
1093                 <retrieve/>
1094                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1095                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1096                 </update>
1097                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1098                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1099                 </delete>
1100             </actions>
1101         </permacrud>
1102         </class>
1103
1104         <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">
1105                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1106                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1107                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1108                 </fields>
1109                 <links/>
1110         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1111             <actions>
1112                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1113                 <retrieve/>
1114                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1115                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1116             </actions>
1117         </permacrud>
1118         </class>
1119
1120         <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">
1121                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1122                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1123                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1124                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1125                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1126                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1127                 </fields>
1128                 <links>
1129                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1130                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1131                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1132                 </links>
1133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1134             <actions>
1135                 <create permission="ADMIN_SURVEY">
1136                     <context link="survey" field="owner"/>
1137                 </create>
1138                 <retrieve/>
1139                 <update permission="ADMIN_SURVEY">
1140                     <context link="survey" field="owner"/>
1141                 </update>
1142                 <delete permission="ADMIN_SURVEY">
1143                     <context link="survey" field="owner"/>
1144                 </delete>
1145             </actions>
1146         </permacrud>
1147         </class>
1148         <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">
1149                 <fields oils_persist:primary="id" oils_persist:sequence="">
1150                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1151                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1152                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1153                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1154                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1155                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1156                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1157                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1158                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1159                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1160                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1161                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1162                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1163                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1164                 </fields>
1165                 <links>
1166                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1167                 </links>
1168         </class>
1169         <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">
1170                 <fields oils_persist:primary="id" oils_persist:sequence="">
1171                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1172                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1173                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1174                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1175                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1176                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1177                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1178                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1179                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1180                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1181                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1182                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1183                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1184                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1185                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1186                 </fields>
1187                 <links>
1188                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1189                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1190                 </links>
1191         </class>
1192         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1193                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1194                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1195                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1196                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1197                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1198                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1199                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1200                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1201                 </fields>
1202                 <links>
1203                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1204                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1205                 </links>
1206         </class>
1207         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1208                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1209                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1210                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1211                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1212                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1213                 </fields>
1214                 <links>
1215                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1216                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1217                 </links>
1218         </class>
1219         <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">
1220                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1221                         <field name="field" reporter:datatype="link"/>
1222                         <field name="id" reporter:datatype="id" />
1223                         <field name="source" reporter:datatype="link"/>
1224                         <field name="value" reporter:datatype="text"/>
1225                 </fields>
1226                 <links>
1227                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1228                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1229                 </links>
1230         </class>
1231         <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">
1232                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1233                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1234                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1235                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1236                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1237                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1238                 </fields>
1239                 <links>
1240                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1241                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1242                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1243                 </links>
1244         </class>
1245         <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">
1246                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1247                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1248                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1249                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1250                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1251                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1252                 </fields>
1253                 <links>
1254                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1255                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1256                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1257                 </links>
1258         </class>
1259         <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">
1260                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1261                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1262                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1263                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1264                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1265                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1266                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1267                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1268                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1269                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1270                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1271                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1272                 </fields>
1273                 <links>
1274                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1275                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1276                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1277                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1278                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1279                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1280                 </links>
1281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1282             <actions>
1283                 <create permission="TRANSIT_COPY" context_field="owner">
1284                     <context link="target_copy" field="circ_lib"/>
1285                 </create>
1286                 <retrieve/>
1287                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1288                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1289             </actions>
1290         </permacrud>
1291         </class>
1292         <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">
1293                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1294                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1295                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1296                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1297                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1298                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1299                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1300                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1301                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1302                 </fields>
1303                 <links>
1304                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1305                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1306                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1307                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1308                 </links>
1309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1310             <actions>
1311                 <create permission="ADMIN_SURVEY">
1312                     <context link="survey" field="owner"/>
1313                 </create>
1314                 <retrieve/>
1315                 <update permission="ADMIN_SURVEY">
1316                     <context link="survey" field="owner"/>
1317                 </update>
1318                 <delete permission="ADMIN_SURVEY">
1319                     <context link="survey" field="owner"/>
1320                 </delete>
1321             </actions>
1322         </permacrud>
1323         </class>
1324         <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">
1325                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1326                         <field name="bucket" />
1327                         <field name="id" reporter:datatype="id" />
1328                         <field name="target_copy" reporter:datatype="link"/>
1329                         <field name="create_time" reporter:datatype="timestamp" />
1330                         <field name="pos" reporter:datatype="int" />
1331                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1332                 </fields>
1333                 <links>
1334                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1335                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1336             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1337                 </links>
1338         </class>
1339         <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">
1340                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1341                         <field name="id" reporter:datatype="id" />
1342                         <field name="item" reporter:datatype="link"/>
1343                         <field name="note" reporter:datatype="text" />
1344                 </fields>
1345                 <links>
1346                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1347                 </links>
1348         </class>
1349         <class id="are" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1350                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1351                         <field name="active" reporter:datatype="bool"/>
1352                         <field name="arn_source" />
1353                         <field name="arn_value" />
1354                         <field name="create_date" reporter:datatype="timestamp"/>
1355                         <field name="creator" />
1356                         <field name="deleted" reporter:datatype="bool"/>
1357                         <field name="edit_date" reporter:datatype="timestamp"/>
1358                         <field name="editor" />
1359                         <field name="id" reporter:datatype="id" />
1360                         <field name="last_xact_id" />
1361                         <field name="marc" />
1362                         <field name="source" />
1363                         <field name="fixed_fields" oils_persist:virtual="true" />
1364                         <field name="notes" oils_persist:virtual="true" />
1365                 </fields>
1366                 <links>
1367                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1368                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1369                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1370                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1371                 </links>
1372         </class>
1373         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1374                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1375                         <field name="char_encoding" />
1376                         <field name="id" />
1377                         <field name="record" />
1378                         <field name="record_status" />
1379                 </fields>
1380                 <links>
1381                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1382                 </links>
1383         </class>
1384         <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">
1385                 <fields oils_persist:primary="code" oils_persist:sequence="">
1386                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1387                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1388                 </fields>
1389                 <links/>
1390         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1391             <actions>
1392                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1393                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1394                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1395                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1396             </actions>
1397         </permacrud>
1398         </class>
1399         <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">
1400                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1401                         <field name="accepting_usr" />
1402                         <field name="amount" reporter:datatype="money" />
1403                         <field name="amount_collected" reporter:datatype="money" />
1404                         <field name="approval_code" reporter:datatype="text"/>
1405                         <field name="cash_drawer" reporter:datatype="link"/>
1406                         <field name="cc_number" reporter:datatype="text"/>
1407                         <field name="cc_type" reporter:datatype="text"/>
1408                         <field name="cc_processor" reporter:datatype="text"/>
1409                         <field name="expire_month" reporter:datatype="int" />
1410                         <field name="expire_year" reporter:datatype="int" />
1411                         <field name="id" reporter:datatype="id" />
1412                         <field name="note" reporter:datatype="text"/>
1413                         <field name="payment_ts" reporter:datatype="timestamp"/>
1414                         <field name="xact" reporter:datatype="link"/>
1415                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1416                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1417                 </fields>
1418                 <links>
1419                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1420                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1421                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1422                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1423                 </links>
1424         </class>
1425         <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">
1426                 <fields oils_persist:primary="name">
1427                         <field reporter:label="Field Class" name="field_class" />
1428                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1429                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1430                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1431                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1432                 </fields>
1433                 <links/>
1434         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1435             <actions>
1436                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1437                 <retrieve/>
1438                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1439                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1440             </actions>
1441         </permacrud>
1442         </class>
1443         <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">
1444                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1445                         <field name="field_class" />
1446                         <field name="id" reporter:datatype="id" />
1447                         <field name="name" reporter:datatype="text"/>
1448                         <field name="xpath" reporter:datatype="text"/>
1449                         <field name="weight" reporter:datatype="int" />
1450                         <field name="format" reporter:datatype="link"/>
1451                         <field name="search_field" reporter:datatype="bool" />
1452                         <field name="facet_field" reporter:datatype="bool" />
1453                 </fields>
1454                 <links/>
1455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1456             <actions>
1457                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1458                 <retrieve/>
1459                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1460                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1461             </actions>
1462         </permacrud>
1463         </class>
1464         <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">
1465                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1466                         <field name="id" reporter:datatype="id" />
1467                         <field name="name" reporter:datatype="text"/>
1468                         <field name="xpath" reporter:datatype="text"/>
1469                         <field name="format" reporter:datatype="link"/>
1470                         <field name="first_word" reporter:datatype="bool" />
1471                 </fields>
1472                 <links/>
1473         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1474             <actions>
1475                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1476                 <retrieve/>
1477                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1478                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1479             </actions>
1480         </permacrud>
1481         </class>
1482         <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">
1483                 <fields oils_persist:primary="code" oils_persist:sequence="">
1484                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1485                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1486                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1487                 </fields>
1488                 <links/>
1489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1490             <actions>
1491                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1492                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1493                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1494                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1495             </actions>
1496         </permacrud>
1497         </class>
1498         <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">
1499                 <fields oils_persist:primary="code" oils_persist:sequence="">
1500                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1501                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1502                 </fields>
1503                 <links/>
1504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1505             <actions>
1506                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1507                 <retrieve/>
1508                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1509                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1510             </actions>
1511         </permacrud>
1512         </class>
1513         <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">
1514                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1515                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1516                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1517                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1518                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1519                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1520                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1521                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1522                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1523                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1524                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1525                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1526                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1527                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1528                 </fields>
1529                 <links>
1530                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1531                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1532                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1533                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1534                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1535                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1536                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1537                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1538                 </links>
1539         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1540             <actions>
1541                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1542                 <retrieve/>
1543                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1544                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1545             </actions>
1546         </permacrud>
1547         </class>
1548         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1549                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1550                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1551                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1552                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1553                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1554                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1555                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1556                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1557                 </fields>
1558                 <links>
1559                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1560                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1561         </links>
1562         </class>
1563         <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">
1564                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1565                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1566                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1567                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1568                 </fields>
1569                 <links>
1570                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1571                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1572                 </links>
1573         </class>
1574         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1575                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1576                         <field name="id" reporter:datatype="id" />
1577                         <field name="value" oils_persist:i18n="true" />
1578                 </fields>
1579                 <links/>
1580         </class>
1581         <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">
1582                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1583                         <field name="balance_owed" reporter:datatype="money" />
1584                         <field name="total_owed" reporter:datatype="money" />
1585                         <field name="total_paid" reporter:datatype="money" />
1586                         <field name="usr" reporter:datatype="link"/>
1587                 </fields>
1588                 <links>
1589                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1590         </links>
1591         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1592             <actions>
1593                 <retrieve permission="VIEW_USER">
1594                     <context link="usr" field="home_ou"/>
1595                 </retrieve>
1596             </actions>
1597         </permacrud>
1598         </class>
1599         <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">
1600                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1601                         <field name="collector" />
1602                         <field name="enter_time" reporter:datatype="timestamp"/>
1603                         <field name="id" reporter:datatype="id" />
1604                         <field name="location" reporter:datatype="link"/>
1605                         <field name="usr" reporter:datatype="link"/>
1606                 </fields>
1607                 <links>
1608                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1609                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1610                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1611                 </links>
1612         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1613             <actions>
1614                 <create permission="money.collections_tracker.create" context_field="location"/>
1615                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1616                 <delete permission="money.collections_tracker.create" context_field="location"/>
1617             </actions>
1618         </permacrud>
1619         </class>
1620         <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">
1621                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1622                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1623                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1624                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1625                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1626                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1627                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1628                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1629                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1630                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1631                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1632                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1633                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1634                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1635                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1636                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1637                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1638                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1639                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1640                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1641                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1642                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1643                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1644                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1645                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1646                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1647                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1648                 </fields>
1649                 <links>
1650                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1651                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1652                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1653                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1654                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1655                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1656                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1657                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1658                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1659                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1660                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1661                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1662                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1663                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1664                 </links>
1665         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1666             <actions>
1667                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1668                 <retrieve/>
1669                 <update permission="UPDATE_MARC" global_required="true"/>
1670             </actions>
1671         </permacrud>
1672         </class>
1673         <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">
1674                 <fields oils_persist:primary="id">
1675                         <field name="dow_0_close" />
1676                         <field name="dow_0_open" />
1677                         <field name="dow_1_close" />
1678                         <field name="dow_1_open" />
1679                         <field name="dow_2_close" />
1680                         <field name="dow_2_open" />
1681                         <field name="dow_3_close" />
1682                         <field name="dow_3_open" />
1683                         <field name="dow_4_close" />
1684                         <field name="dow_4_open" />
1685                         <field name="dow_5_close" />
1686                         <field name="dow_5_open" />
1687                         <field name="dow_6_close" />
1688                         <field name="dow_6_open" />
1689                         <field name="id" reporter:datatype="id" />
1690                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1691                 </fields>
1692                 <links>
1693                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
1694                 </links>
1695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1696             <actions>
1697                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
1698                 <retrieve/>
1699                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
1700                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
1701             </actions>
1702         </permacrud>
1703         </class>
1704         <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">
1705                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1706                         <field name="close_end" reporter:datatype="timestamp" />
1707                         <field name="close_start" reporter:datatype="timestamp" />
1708                         <field name="id" reporter:datatype="id" />
1709                         <field name="org_unit" reporter:datatype="org_unit"/>
1710                         <field name="reason" reporter:datatype="text"/>
1711                 </fields>
1712                 <links>
1713                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1714                 </links>
1715         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1716             <actions>
1717                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1718                 <retrieve/>
1719                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1720                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1721             </actions>
1722         </permacrud>
1723         </class>
1724         <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">
1725                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1726                         <field name="extended" reporter:datatype="interval"/>
1727                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1728                         <field name="max_renewals" reporter:datatype="int" />
1729                         <field name="name" reporter:datatype="text"/>
1730                         <field name="normal" reporter:datatype="interval"/>
1731                         <field name="shrt" reporter:datatype="interval"/>
1732                 </fields>
1733                 <links>
1734                 </links>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1740                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1741             </actions>
1742         </permacrud>
1743         </class>
1744         <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">
1745                 <fields oils_persist:primary="id" oils_persist:sequence="">
1746                         <field name="balance_owed" reporter:datatype="money"/>
1747                         <field name="id" reporter:datatype="id" />
1748                         <field name="last_billing_note" reporter:datatype="text"/>
1749                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1750                         <field name="last_billing_type" reporter:datatype="text"/>
1751                         <field name="last_payment_note" reporter:datatype="text"/>
1752                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1753                         <field name="last_payment_type" reporter:datatype="text"/>
1754                         <field name="total_owed" reporter:datatype="money"/>
1755                         <field name="total_paid" reporter:datatype="money"/>
1756                         <field name="usr" reporter:datatype="link"/>
1757                         <field name="xact_finish" reporter:datatype="timestamp" />
1758                         <field name="xact_start" reporter:datatype="timestamp" />
1759                         <field name="xact_type" reporter:datatype="text"/>
1760                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1761                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1762                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1763                         <field name="billing_location" reporter:datatype="link"/>
1764                 </fields>
1765                 <links>
1766                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1767                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1768                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1769                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1770                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1771                 </links>
1772         </class>
1773         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1774                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1775                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1776                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1777                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1778                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1779                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1780                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1781                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1782                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1783                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1784                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1785                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1786                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1787                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1788                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1789                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1790                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1791                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1792                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
1793                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1794                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1795                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1796                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1797                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1798                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1799                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1800                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1801                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1802                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1803                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1804                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1805                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1806                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1807                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
1808                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
1809                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
1810                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
1811                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
1812                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
1813                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
1814                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
1815                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
1816                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
1817                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
1818                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
1819                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
1820                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
1821                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
1822                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
1823                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
1824                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
1825                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
1826                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1827                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1828                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
1829                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
1830                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1831                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1832                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
1833                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1834                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
1835                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
1836                 </fields>
1837                 <links>
1838                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
1839                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
1840                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
1841                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
1842                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
1843                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
1844                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
1845                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
1846                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
1847                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
1848                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
1849                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
1850                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
1851                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
1852                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
1853                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
1854                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
1855                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
1856                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
1857                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
1858                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
1859                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
1860                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
1861                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
1862                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
1863                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
1864                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
1865                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
1866                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
1867                 </links>
1868         </class>
1869
1870         <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">
1871                 <fields oils_persist:primary="name">
1872                         <field name="name" reporter:datatype="text"/>
1873                         <field name="label" reporter:datatype="text"/>
1874                         <field name="description" reporter:datatype="text"/>
1875                         <field name="datatype" reporter:datatype="text"/>
1876                         <field name="fm_class" reporter:datatype="text"/>
1877                 </fields>
1878                 <links>
1879                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
1880                 </links>
1881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1882                         <actions>
1883                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1884                                 <retrieve/>
1885                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1886                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1887                         </actions>
1888                 </permacrud>
1889         </class>
1890         <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">
1891                 <fields oils_persist:primary="name">
1892                         <field name="name" reporter:datatype="text"/>
1893                         <field name="label" reporter:datatype="text"/>
1894                         <field name="description" reporter:datatype="text"/>
1895                         <field name="datatype" reporter:datatype="text"/>
1896                         <field name="view_perm" reporter:datatype="link"/>
1897                         <field name="update_perm" reporter:datatype="link"/>
1898                         <field name="fm_class" reporter:datatype="text"/>
1899                 </fields>
1900                 <links>
1901                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
1902                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
1903                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
1904                 </links>
1905                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1906                         <actions>
1907                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1908                                 <retrieve/>
1909                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1910                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1911                         </actions>
1912                 </permacrud>
1913         </class>
1914         <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">
1915                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
1916                         <field name="id" />
1917                         <field name="name"  reporter:datatype="text"/>
1918                         <field name="org_unit" reporter:datatype="org_unit"/>
1919                         <field name="value"  reporter:datatype="text"/>
1920                 </fields>
1921                 <links>
1922                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1923                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
1924                 </links>
1925         </class>
1926         <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">
1927                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
1928                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1929                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
1930                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1931                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
1932                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1933                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
1934                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
1935                 </fields>
1936                 <links>
1937                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
1938                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1939                 </links>
1940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1941             <actions>
1942                 <create permission="CREATE_COPY_NOTE">
1943                     <context link="owning_copy" field="circ_lib"/>
1944                 </create>
1945                 <retrieve permission="VIEW_COPY_NOTES">
1946                     <context link="owning_copy" field="circ_lib"/>
1947                 </retrieve>
1948                 <update permission="UPDATE_COPY_NOTE">
1949                     <context link="owning_copy" field="circ_lib"/>
1950                 </update>
1951                 <delete permission="DELETE_COPY_NOTE">
1952                     <context link="owning_copy" field="circ_lib"/>
1953                 </delete>
1954             </actions>
1955         </permacrud>
1956         </class>
1957         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
1958                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
1959                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
1960                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
1961                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
1962                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
1963                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
1964                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
1965                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
1966                 </fields>
1967                 <links>
1968                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1969                 </links>
1970         </class>
1971         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
1972                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
1973                         <field name="fingerprint"  reporter:datatype="text"/>
1974                         <field name="id" reporter:datatype="id" />
1975                         <field name="master_record" reporter:datatype="link"/>
1976                         <field name="mods"  reporter:datatype="text"/>
1977                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
1978                 </fields>
1979                 <links>
1980                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
1981                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
1982                 </links>
1983         </class>
1984         <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">
1985                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
1986                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
1987                         <field name="name"  reporter:datatype="text"/>
1988                 </fields>
1989                 <links/>
1990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1991             <actions>
1992                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
1993                 <retrieve/>
1994                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
1995                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
1996             </actions>
1997         </permacrud>
1998         </class>
1999         <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">
2000                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2001                         <field name="code"  reporter:datatype="text"/>
2002                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2003                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2004                 </fields>
2005                 <links/>
2006         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2007             <actions>
2008                 <create permission="CREATE_PERM" global_required="true"/>
2009                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2010                 <update permission="UPDATE_PERM" global_required="true"/>
2011                 <delete permission="DELETE_PERM" global_required="true"/>
2012             </actions>
2013         </permacrud>
2014         </class>
2015         <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">
2016                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2017                         <field name="id" reporter:datatype="id" />
2018                         <field name="metarecord" reporter:datatype="link"/>
2019                         <field name="source" reporter:datatype="link"/>
2020                 </fields>
2021                 <links>
2022                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2023                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2024                 </links>
2025         </class>
2026         <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">
2027                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2028                         <field name="field" reporter:datatype="link"/>
2029                         <field name="id" reporter:datatype="id" />
2030                         <field name="source" reporter:datatype="link"/>
2031                         <field name="value"  reporter:datatype="text"/>
2032                 </fields>
2033                 <links>
2034                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2035                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2036                 </links>
2037         </class>
2038         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2039                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2040                         <field name="accepting_usr" reporter:datatype="link"/>
2041                         <field name="amount" reporter:datatype="money" />
2042                         <field name="amount_collected" reporter:datatype="money" />
2043                         <field name="cash_drawer" reporter:datatype="link"/>
2044                         <field name="id" reporter:datatype="id" />
2045                         <field name="note"  reporter:datatype="text"/>
2046                         <field name="payment_ts" reporter:datatype="timestamp"/>
2047                         <field name="xact" reporter:datatype="link"/>
2048                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2049                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2050                 </fields>
2051                 <links>
2052                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2053                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2054                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2055                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2056                 </links>
2057         </class>
2058         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2059                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2060                         <field name="accepting_usr" reporter:datatype="link"/>
2061                         <field name="amount" reporter:datatype="money" />
2062                         <field name="amount_collected" reporter:datatype="money" />
2063                         <field name="id" reporter:datatype="id" />
2064                         <field name="note"  reporter:datatype="text"/>
2065                         <field name="payment_ts" reporter:datatype="timestamp"/>
2066                         <field name="xact" reporter:datatype="link"/>
2067                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2068                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2069                 </fields>
2070                 <links>
2071                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2072                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2073                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2074                 </links>
2075         </class>
2076         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2077                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2078                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2079                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2080                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2081                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2082                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2083                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2084                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2085                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2086                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2087                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2088                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2089                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2090                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2091                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2092                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2093                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2094                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2095                 </fields>
2096                 <links>
2097                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2098                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2099                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2100                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2101                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2102                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2103                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2104                 </links>
2105         </class>
2106
2107         <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">
2108                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2109                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2110                         <field name="name"  reporter:datatype="text"/>
2111                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2112                         <field name="block_list" reporter:datatype="text"/>
2113                         <field name="org_depth" reporter:datatype="int"/>
2114                 </fields>
2115                 <links/>
2116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2117             <actions>
2118                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2119                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2120                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2121                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2122             </actions>
2123         </permacrud>
2124         </class>
2125         <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">
2126                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2127                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2128                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2129                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2130                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2131                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2132                 </fields>
2133                 <links>
2134                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2135                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2136                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2137         </links>
2138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2139             <actions>
2140                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2141                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2142                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2143                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2144             </actions>
2145         </permacrud>
2146         </class>
2147         <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">
2148                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2149                         <field name="holdable" reporter:datatype="bool"/>
2150                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2151                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2152                         <field name="opac_visible" reporter:datatype="bool"/>
2153                 </fields>
2154                 <links/>
2155         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2156             <actions>
2157                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2158                 <retrieve permission="CREATE_COPY_STATUS UPDATE_COPY_STATUS DELETE_COPY_STATUS" global_required="true"/>
2159                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2160                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2161             </actions>
2162         </permacrud>
2163         </class>
2164         <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">
2165                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2166                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2167                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2168                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2169                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2170                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2171                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2172                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2173                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2174                 </fields>
2175                 <links>
2176                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2177                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2178                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2179                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2180                 </links>
2181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2182                         <actions>
2183                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2184                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2185                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2186                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2187                         </actions>
2188                 </permacrud>
2189         </class>
2190         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2191                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2192                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2193                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2194                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2195                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2196                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2197                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2198                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2199                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2200                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2201                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2202                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2203                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2204                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2205                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2206                 </fields>
2207                 <links>
2208                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2209                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2210                 </links>
2211         </class>
2212         <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">
2213                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2214                         <field name="call_number" />
2215                         <field name="create_date" reporter:datatype="timestamp"/>
2216                         <field name="creator" reporter:datatype="link"/>
2217                         <field name="id" reporter:datatype="id" />
2218                         <field name="pub" reporter:datatype="bool"/>
2219                         <field name="title"  reporter:datatype="text"/>
2220                         <field name="value"  reporter:datatype="text"/>
2221                 </fields>
2222                 <links>
2223                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2224                 </links>
2225         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2226             <actions>
2227                 <create permission="CREATE_VOLUME_NOTE">
2228                     <context link="call_number" field="owning_lib"/>
2229                 </create>
2230                 <retrieve permission="VIEW_VOLUME_NOTES">
2231                     <context link="call_number" field="owning_lib"/>
2232                 </retrieve>
2233                 <update permission="UPDATE_VOLUME_NOTE">
2234                     <context link="call_number" field="owning_lib"/>
2235                 </update>
2236                 <delete permission="DELETE_VOLUME_NOTE">
2237                     <context link="call_number" field="owning_lib"/>
2238                 </delete>
2239             </actions>
2240         </permacrud>
2241         </class>
2242         <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">
2243                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2244                         <field name="create_date" reporter:datatype="timestamp"/>
2245                         <field name="creator" reporter:datatype="link"/>
2246                         <field name="edit_date" reporter:datatype="timestamp"/>
2247                         <field name="editor" reporter:datatype="link"/>
2248                         <field name="id" reporter:datatype="id" />
2249                         <field name="record" reporter:datatype="link"/>
2250                         <field name="value" reporter:datatype="text"/>
2251                 </fields>
2252                 <links>
2253                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2254                 </links>
2255         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2256             <actions>
2257                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2258                 <retrieve permission="VIEW_AUTHORITY_RECORD_NOTES" global_required='true'/>
2259                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2260                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2261             </actions>
2262         </permacrud>
2263         </class>
2264         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2265                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2266                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2267                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2268                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2269                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2270                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2271                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2272                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2273                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2274                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2275                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2276                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2277                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2278                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2279                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2280                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2281                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2282                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2283                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2284                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2285                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2286                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2287                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2288                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2289                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2290                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2291                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2292                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2293                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2294                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2295                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2296                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2297                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2298                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2299                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2300                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2301                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2302                 </fields>
2303                 <links>
2304                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2305                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2306                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2307                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2308                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2309                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2310                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2311                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2312                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2313                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2314                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2315                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2316                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2317                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2318                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2319                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2320                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2321                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2322                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2323                 </links>
2324         </class>
2325         <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">
2326                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2327                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2328                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2329                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2330                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2331                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2332                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2333                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2334                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2335                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2336                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2337                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2338                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2339                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2340                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2341                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2342                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2343                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2344                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2345                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2346                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2347                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2348                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2349                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2350                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2351                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2352                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2353                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2354                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2355                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2356                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2357                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2358                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2359                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2360                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2361                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2362                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2363                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2364                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2365                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2366                 </fields>
2367                 <links>
2368                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2369                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2370                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2371                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2372                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2373                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2374                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2375                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2376                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2377                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2378                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2379                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2380                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2381                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2382                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2383                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2384                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2385                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2386                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2387                 </links>
2388         </class>
2389         <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">
2390                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2391                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2392                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2393                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2394                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2395                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2396                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2397                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2398                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2399                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2400                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2401                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2402                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2403                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2404                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2405                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2406                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2407                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2408                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2409                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2410                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2411                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2412                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2413                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2414                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2415                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2416                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2417                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2418                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2419                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2420                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2421                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2422                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2423                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2424                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2425                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2426                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2427                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2428                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2429                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2430                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2431                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2432                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2433                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2434                 </fields>
2435                 <links>
2436                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2437                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2438                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2439                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2440                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2441                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2442                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2443                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2444                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2445                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2446                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2447                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2448                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2449                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2450                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2451                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2452                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2453                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2454                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2455                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2456                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2457                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2458                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2459                 </links>
2460         </class>
2461
2462         <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">
2463                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2464                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id"/>
2465                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2466                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2467                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2468                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2469                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2470                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2471                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2472                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2473                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
2474                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2475                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2476                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
2477                 </fields>
2478                 <links>
2479                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2480                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2481                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
2482                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
2483                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
2484                 </links>
2485                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2486                         <actions>
2487                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2488                                 <retrieve />
2489                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2490                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2491                         </actions>
2492                 </permacrud>
2493         </class>
2494
2495         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
2496                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
2497                         <field reporter:label="Resource ID" name="id" reporter:datatype="id"/>
2498                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2499                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
2500                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
2501                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2502                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
2503                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
2504                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
2505                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2506                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2507                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2508                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
2509                 </fields>
2510                 <links>
2511                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2512                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
2513                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
2514                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
2515                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
2516                 </links>
2517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2518                         <actions>
2519                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2520                                 <retrieve />
2521                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2522                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2523                         </actions>
2524                 </permacrud>
2525         </class>
2526         
2527         <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">
2528                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
2529                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id"/>
2530                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2531                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
2532                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
2533                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
2534                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
2535                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2536                 </fields>
2537                 <links>
2538                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2539                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
2540                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
2541                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
2542                 </links>
2543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2544                         <actions>
2545                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2546                                 <retrieve />
2547                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2548                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2549                         </actions>
2550                 </permacrud>
2551         </class>
2552         
2553         <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">
2554                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
2555                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id"/>
2556                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2557                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
2558                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
2559                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2560                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2561                 </fields>
2562                 <links>
2563                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2564                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
2565                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
2566                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
2567                 </links>
2568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2569                         <actions>
2570                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2571                                 <retrieve />
2572                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2573                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2574                         </actions>
2575                 </permacrud>
2576         </class>
2577         
2578         <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">
2579                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
2580                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
2581                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
2582                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
2583                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
2584                 </fields>
2585                 <links>
2586                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
2587                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
2588                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
2589                 </links>
2590                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2591                         <actions>
2592                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2593                                 <retrieve />
2594                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2595                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2596                         </actions>
2597                 </permacrud>
2598         </class>
2599         
2600         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
2601                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2602                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2603                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2604                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
2605                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
2606                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2607                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2608                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2609                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2610                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2611                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
2612                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2613                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
2614                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
2615                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
2616                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
2617                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
2618                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
2619                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
2620                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2621                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2622                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2623                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
2624                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
2625                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
2626                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
2627                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
2628                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
2629                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2630                 </fields>
2631                 <links>
2632                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2633                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2634                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2635                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2636                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2637                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2638                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
2639                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2640                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2641                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2642                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
2643                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
2644                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
2645                 </links>
2646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2647                         <actions>
2648                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2649                                 <retrieve />
2650                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2651                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2652                         </actions>
2653                 </permacrud>
2654         </class>
2655         
2656         <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">
2657                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
2658                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
2659                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
2660                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
2661                 </fields>
2662                 <links>
2663                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
2664                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
2665                 </links>
2666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2667                         <actions>
2668                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2669                                 <retrieve />
2670                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2671                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2672                         </actions>
2673                 </permacrud>
2674         </class>
2675
2676         <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">
2677                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2678                         <field name="bucket" reporter:datatype="link"/>
2679                         <field name="id" reporter:datatype="id" />
2680                         <field name="target_call_number" reporter:datatype="link" />
2681                         <field name="create_time" reporter:datatype="timestamp" />
2682                         <field name="pos" reporter:datatype="int" />
2683                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2684                 </fields>
2685                 <links>
2686                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2687                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2688             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2689                 </links>
2690         </class>
2691         <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">
2692                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2693                         <field name="id" reporter:datatype="id" />
2694                         <field name="item" reporter:datatype="link"/>
2695                         <field name="note" reporter:datatype="text" />
2696                 </fields>
2697                 <links>
2698                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2699                 </links>
2700         </class>
2701         <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">
2702                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2703                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2704                         <field name="btype" reporter:datatype="text"/>
2705                         <field name="id" reporter:datatype="id" />
2706                         <field name="name" reporter:datatype="text"/>
2707                         <field name="owner" reporter:datatype="link"/>
2708                         <field name="pub" reporter:datatype="bool"/>
2709                         <field name="create_time" reporter:datatype="timestamp" />
2710                 </fields>
2711                 <links>
2712                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2713                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2714                 </links>
2715         </class>
2716         <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">
2717                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2718                         <field name="id" reporter:datatype="id" />
2719                         <field name="bucket" reporter:datatype="link"/>
2720                         <field name="note" reporter:datatype="text" />
2721                 </fields>
2722                 <links>
2723                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2724                 </links>
2725         </class>
2726         <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">
2727                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2728                         <field name="hold" reporter:datatype="link"/>
2729                         <field name="id" reporter:datatype="id" />
2730                         <field name="target_copy" reporter:datatype="link"/>
2731                 </fields>
2732                 <links>
2733                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2734                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2735                 </links>
2736         </class>
2737         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2738                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2739                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2740                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2741                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2742                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2743                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2744                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2745                 </fields>
2746                 <links>
2747                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2748                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2749                 </links>
2750         </class>
2751         <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">
2752                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2753                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2754                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2755                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2756                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2757                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2758                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2759                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2760                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
2761                 </fields>
2762                 <links>
2763                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2764                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2765                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
2766                 </links>
2767         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2768             <actions>
2769                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2770                 <retrieve/>
2771                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2772                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2773             </actions>
2774         </permacrud>
2775         </class>
2776
2777     <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">
2778         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
2779             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
2780             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
2781             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
2782             <field reporter:label="Position" name="position" reporter:datatype="int"/>
2783         </fields>
2784         <links>
2785             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
2786             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
2787         </links>
2788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2789             <actions>
2790                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2791                 <retrieve/>
2792                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2793                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2794             </actions>
2795         </permacrud>
2796     </class>
2797
2798         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2799                 <fields>
2800                         <field name="id" oils_persist:virtual="true" />
2801                         <field name="location" oils_persist:virtual="true" />
2802                         <field name="owning_lib" oils_persist:virtual="true" />
2803                         <field name="holdings" oils_persist:virtual="true" />
2804                         <field name="current_holdings" oils_persist:virtual="true" />
2805                         <field name="supplements" oils_persist:virtual="true" />
2806                         <field name="current_supplements" oils_persist:virtual="true" />
2807                         <field name="indexes" oils_persist:virtual="true" />
2808                         <field name="current_indexes" oils_persist:virtual="true" />
2809                         <field name="online" oils_persist:virtual="true" />
2810                         <field name="missing" oils_persist:virtual="true" />
2811                         <field name="incomplete" oils_persist:virtual="true" />
2812                 </fields>
2813         </class>
2814         <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">
2815                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
2816                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2817                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2818                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2819                         <field reporter:label="Creator" name="creator" />
2820                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2821                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
2822                         <field reporter:label="Editor" name="editor" />
2823                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2824                         <field reporter:label="Last Transaction ID" name="last_xact_id" />
2825                         <field reporter:label="MARC" name="marc" />
2826                         <field reporter:label="Source" name="source" />
2827                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
2828                 </fields>
2829                 <links>
2830                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2831                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2832                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2833                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2834                 </links>
2835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2836                         <actions>
2837                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
2838                                 <retrieve/>
2839                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
2840                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
2841                         </actions>
2842                 </permacrud>
2843         </class>
2844         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
2845                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
2846                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2847                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link"/>
2848                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
2849                         <field reporter:label="Start date" name="start_date" reporter:datatype="timestamp"/>
2850                         <field reporter:label="End date" name="end_date" reporter:datatype="timestamp"/>
2851                 </fields>
2852                 <links>
2853                         <link field="call_number" reltype="might_have" key="id" map="" class="acn"/>
2854                         <link field="uri" reltype="might_have" key="id" map="" class="auri"/>
2855                 </links>
2856         </class>
2857         <class id="sbu" controller="open-ils.cstore" oils_obj:fieldmapper="serial::binding_unit" oils_persist:tablename="serial.binding_unit" reporter:label="Binding Unit">
2858                 <fields oils_persist:primary="id" oils_persist:sequence="serial.binding_unit_id_seq">
2859                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2860                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
2861                         <field reporter:label="Label" name="label" />
2862                 </fields>
2863                 <links>
2864                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2865                 </links>
2866         </class>
2867         <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
2868                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
2869                         <field name="id" reporter:datatype="id" />
2870                         <field name="subscription" reporter:datatype="link"/>
2871                         <field name="target_copy" reporter:datatype="link"/>
2872                         <field name="location" reporter:datatype="link"/>
2873                         <field name="binding_unit" reporter:datatype="link"/>
2874                         <field name="label" />
2875                 </fields>
2876                 <links>
2877                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2878                         <link field="target_copy" reltype="might_have" key="id" map="" class="acp"/>
2879                         <link field="location" reltype="might_have" key="id" map="" class="acpl"/>
2880                         <link field="binding_unit" reltype="might_have" key="id" map="" class="sbu"/>
2881                 </links>
2882         </class>
2883         <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
2885                         <field name="id" reporter:datatype="id" />
2886                         <field name="subscription" reporter:datatype="link"/>
2887                         <field name="generated_coverage" reporter:datatype="text"/>
2888                         <field name="textual_holdings" reporter:datatype="text"/>
2889                 </fields>
2890                 <links>
2891                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2892                 </links>
2893         </class>
2894         <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
2895                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
2896                         <field name="id" reporter:datatype="id" />
2897                         <field name="subscription" reporter:datatype="link"/>
2898                         <field name="generated_coverage" reporter:datatype="text"/>
2899                         <field name="textual_holdings" reporter:datatype="text"/>
2900                 </fields>
2901                 <links>
2902                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2903                 </links>
2904         </class>
2905         <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
2906                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
2907                         <field name="id" reporter:datatype="id" />
2908                         <field name="subscription" reporter:datatype="link"/>
2909                         <field name="generated_coverage" reporter:datatype="text"/>
2910                         <field name="textual_holdings" reporter:datatype="text"/>
2911                 </fields>
2912                 <links>
2913                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2914                 </links>
2915         </class>
2916
2917         <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">
2918                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
2919                         <field name="id" reporter:datatype="id" />
2920                         <field name="owning_copy" reporter:datatype="link"/>
2921                         <field name="stat_cat" reporter:datatype="link"/>
2922                         <field name="stat_cat_entry" reporter:datatype="link"/>
2923                 </fields>
2924                 <links>
2925                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2926                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
2927                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
2928                 </links>
2929         </class>
2930         <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">
2931                 <fields oils_persist:primary="code">
2932                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2933                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2934                 </fields>
2935                 <links/>
2936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2937             <actions>
2938                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2939                 <retrieve/>
2940                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2941                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2942             </actions>
2943         </permacrud>
2944         </class>
2945         <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">
2946                 <fields oils_persist:primary="code">
2947                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
2948                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2949                 </fields>
2950                 <links/>
2951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2952             <actions>
2953                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2954                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
2955                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2956                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2957             </actions>
2958         </permacrud>
2959         </class>
2960         <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">
2961                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
2962                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
2963                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
2964                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
2965                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
2966                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
2967                 </fields>
2968                 <links>
2969             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2970         </links>
2971         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2972             <actions>
2973                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2974                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2975                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2976                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2977             </actions>
2978         </permacrud>
2979         </class>
2980         <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">
2981                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
2982                         <field name="id" reporter:datatype="id" />
2983                         <field name="name" reporter:datatype="text"/>
2984                 </fields>
2985                 <links/>
2986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2987             <actions>
2988                 <create permission="CREATE_LASSO" global_required="true"/>
2989                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
2990                 <update permission="UPDATE_LASSO" global_required="true"/>
2991                 <delete permission="DELETE_LASSO" global_required="true"/>
2992             </actions>
2993         </permacrud>
2994         </class>
2995         <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">
2996                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
2997                         <field name="id" reporter:datatype="id" />
2998                         <field name="lasso" reporter:datatype="link"/>
2999                         <field name="org_unit" reporter:datatype="org_unit"/>
3000                 </fields>
3001                 <links>
3002                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
3003                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3004                 </links>
3005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3006             <actions>
3007                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
3008                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
3009                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
3010                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
3011             </actions>
3012         </permacrud>
3013         </class>
3014         <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">
3015                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3016                         <field name="id" reporter:datatype="id" />
3017                         <field name="from_org" reporter:datatype="org_unit"/>
3018                         <field name="to_org" reporter:datatype="org_unit"/>
3019                         <field name="prox" reporter:datatype="int" />
3020                 </fields>
3021                 <links>
3022                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
3023                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
3024                 </links>
3025         </class>
3026         <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">
3027                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3028                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3029                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
3030                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
3031                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
3032                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
3033                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
3034                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
3035                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
3036                 </fields>
3037                 <links/>
3038         </class>
3039         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
3040                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
3041                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
3042                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3043                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
3044                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
3045                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
3046                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3047                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
3048                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3049                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
3050                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
3051                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
3052                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
3053                 </fields>
3054                 <links>
3055                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3056                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
3057                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
3058                 </links>
3059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3060             <actions>
3061                 <create permission="ADMIN_SURVEY" context_field="owner"/>
3062                 <retrieve/>
3063                 <update permission="ADMIN_SURVEY" context_field="owner"/>
3064                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
3065             </actions>
3066         </permacrud>
3067         </class>
3068         <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">
3069                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
3070                         <field name="address_type"  reporter:datatype="text"/>
3071                         <field name="city"  reporter:datatype="text"/>
3072                         <field name="country"  reporter:datatype="text"/>
3073                         <field name="county"  reporter:datatype="text"/>
3074                         <field name="id" reporter:datatype="id" />
3075                         <field name="org_unit" reporter:datatype="org_unit"/>
3076                         <field name="post_code"  reporter:datatype="text"/>
3077                         <field name="state"  reporter:datatype="text"/>
3078                         <field name="street1"  reporter:datatype="text"/>
3079                         <field name="street2"  reporter:datatype="text"/>
3080                         <field name="valid" reporter:datatype="bool"/>
3081                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
3082                 </fields>
3083                 <links>
3084                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3085                 </links>
3086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3087             <actions>
3088                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
3089                 <retrieve/>
3090                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
3091                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
3092             </actions>
3093         </permacrud>
3094         </class>
3095         <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">
3096                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
3097                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
3098                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
3099                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
3100                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
3101                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3102                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
3103                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
3104                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
3105                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
3106                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
3107                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
3108                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
3109                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
3110                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
3111                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
3112                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
3113                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
3114                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
3115                         <field reporter:label="Item Selection Depth" name="selection_depth" />
3116                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
3117                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
3118                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
3119                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
3120                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
3121                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
3122                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
3123                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
3124                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
3125                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
3126                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
3127                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
3128                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
3129                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
3130                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
3131                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
3132                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
3133                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
3134                 </fields>
3135                 <links>
3136                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
3137                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
3138                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
3139                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
3140                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
3141                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3142                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3143                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3144                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
3145                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
3146                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
3147                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
3148                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
3149                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
3150                 </links>
3151         </class>
3152         <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">
3153                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
3154                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3155                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
3156                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3157                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
3158                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
3159                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
3160                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
3161                 </fields>
3162                 <links>
3163                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3164                 </links>
3165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3166                         <actions>
3167                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
3168                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
3169                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
3170                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
3171                         </actions>
3172                 </permacrud>
3173         </class>
3174         <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">
3175                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
3176                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3177                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
3178                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
3179                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
3180                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
3181                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3182                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3183                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
3184                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
3185                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text"/>
3186                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
3187                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
3188                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3189                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
3190                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
3191                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
3192                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3193                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3194                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3195                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3196                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
3197                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3198                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
3199                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
3200                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3201                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
3202                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3203                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3204                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3205                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
3206                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
3207                 </fields>
3208                 <links>
3209                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
3210                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
3211                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
3212                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
3213                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
3214                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
3215                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
3216                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
3217                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
3218                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
3219                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
3220                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
3221                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
3222                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
3223                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
3224                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
3225                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
3226                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
3227                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
3228                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
3229                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
3230                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
3231                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
3232                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
3233                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
3234                 </links>
3235         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3236             <actions>
3237                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
3238                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
3239                     <context field="id"/>
3240                     <context field="parent_ou"/>
3241                                 </retrieve>
3242                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
3243                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
3244             </actions>
3245         </permacrud>
3246         </class>
3247         <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">
3248                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
3249                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3250                         <field name="btype" reporter:datatype="text"/>
3251                         <field name="id" reporter:datatype="id" />
3252                         <field name="name"  reporter:datatype="text"/>
3253                         <field name="owner" reporter:datatype="link"/>
3254                         <field name="pub" reporter:datatype="bool"/>
3255                         <field name="create_time" reporter:datatype="timestamp" />
3256                 </fields>
3257                 <links>
3258                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3259                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
3260                 </links>
3261         </class>
3262         <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">
3263                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
3264                         <field name="id" reporter:datatype="id" />
3265                         <field name="bucket" reporter:datatype="link"/>
3266                         <field name="note" reporter:datatype="text" />
3267                 </fields>
3268                 <links>
3269                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3270                 </links>
3271         </class>
3272         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
3273                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
3274                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3275                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3276                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3277                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3278                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3279                 </fields>
3280                 <links>
3281                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3282                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
3283                 </links>
3284         </class>
3285         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
3286                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
3287                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
3288                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3289                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
3290                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3291                 </fields>
3292                 <links>
3293                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3294                 </links>
3295         </class>
3296         <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">
3297                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
3298                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3299                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3300                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3301                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3302                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3303                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
3304                 </fields>
3305                 <links>
3306                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3307                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
3308                 </links>
3309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3310             <actions>
3311                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
3312                 <retrieve />
3313                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
3314                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
3315             </actions>
3316         </permacrud>
3317         </class>
3318         <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">
3319                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
3320                         <field name="field" reporter:datatype="link"/>
3321                         <field name="id" reporter:datatype="id" />
3322                         <field name="source" reporter:datatype="link"/>
3323                         <field name="value"  reporter:datatype="text"/>
3324                 </fields>
3325                 <links>
3326                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3327                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3328                 </links>
3329         </class>
3330         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
3331                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
3332                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3333                         <field name="btype" reporter:datatype="text"/>
3334                         <field name="id" reporter:datatype="id" />
3335                         <field name="name"  reporter:datatype="text"/>
3336                         <field name="owner" reporter:datatype="link"/>
3337                         <field name="pub" reporter:datatype="bool"/>
3338                         <field name="create_time" reporter:datatype="timestamp" />
3339                 </fields>
3340                 <links>
3341                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3342                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
3343                 </links>
3344         </class>
3345         <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">
3346                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
3347                         <field name="id" reporter:datatype="id" />
3348                         <field name="bucket" reporter:datatype="link"/>
3349                         <field name="note" reporter:datatype="text" />
3350                 </fields>
3351                 <links>
3352                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3353                 </links>
3354         </class>
3355         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
3356                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3357                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3358                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3359                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3360                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
3361                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
3362                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3363                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3364                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3365                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3366                 </fields>
3367                 <links>
3368                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3369                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3370                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3371                 </links>
3372         </class>
3373         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
3374                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
3375                         <field name="id" reporter:datatype="id" />
3376                         <field name="ind1" />
3377                         <field name="ind2" />
3378                         <field name="record" />
3379                         <field name="subfield" />
3380                         <field name="tag" />
3381                         <field name="value" />
3382                 </fields>
3383                 <links>
3384                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3385                 </links>
3386         </class>
3387         <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">
3388                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
3389                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
3390                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3391                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
3392                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3393                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3394                 </fields>
3395                 <links>
3396                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3397                 </links>
3398         </class>
3399         <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">
3400                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
3401                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3402                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
3403                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
3404                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
3405                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3406                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3407                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
3408                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
3409                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
3410                 </fields>
3411                 <links>
3412                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
3413                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
3414                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
3415                 </links>
3416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3417             <actions>
3418                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
3419                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT" global_required="true"/>
3420                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
3421                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
3422             </actions>
3423         </permacrud>
3424         </class>
3425         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
3426                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
3427                         <field name="create_date" reporter:datatype="timestamp"/>
3428                         <field name="creator" reporter:datatype="link"/>
3429                         <field name="edit_date" reporter:datatype="timestamp"/>
3430                         <field name="editor" reporter:datatype="link"/>
3431                         <field name="id" reporter:datatype="id" />
3432                         <field name="pub" reporter:datatype="bool"/>
3433                         <field name="record" reporter:datatype="link"/>
3434                         <field name="value"  reporter:datatype="text"/>
3435                 </fields>
3436                 <links>
3437                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3438                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3439                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3440                 </links>
3441         </class>
3442         <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">
3443                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3444                         <field name="balance_owed" reporter:datatype="money" />
3445                         <field name="total_owed" reporter:datatype="money" />
3446                         <field name="total_paid" reporter:datatype="money" />
3447                         <field name="usr" reporter:datatype="link"/>
3448                 </fields>
3449                 <links>
3450                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3451                 </links>
3452         </class>
3453         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
3454                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3455                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
3456                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3457                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
3458                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3459                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
3460                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
3461                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3462                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3463                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3464                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3465                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3466                 </fields>
3467                 <links>
3468                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3469                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3470                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3471                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3472                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3473                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3474                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3475                 </links>
3476         </class>
3477         <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">
3478                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
3479                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
3480                         <field name="quality" reporter:datatype="int" />
3481                         <field name="source" reporter:datatype="text"/>
3482                         <field name="transcendant" reporter:datatype="bool"/>
3483                 </fields>
3484                 <links/>
3485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3486             <actions>
3487                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
3488                 <retrieve/>
3489                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
3490                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
3491             </actions>
3492         </permacrud>
3493         </class>
3494         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
3495                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3496                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3497                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3498                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3499                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3500                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3501                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3502                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3503                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3504                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3505                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3506                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3507                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3508                 </fields>
3509                 <links>
3510                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3511                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3512                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3513                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3514                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3515                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3516                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3517                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3518                 </links>
3519         </class>
3520         <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">
3521                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
3522                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3523                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3524                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3525                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
3526                 </fields>
3527                 <links>
3528                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3529                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3530                 </links>
3531         </class>
3532         <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">
3533                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
3534                         <field name="bucket" reporter:datatype="link"/>
3535                         <field name="id" reporter:datatype="id" />
3536                         <field name="target_user" reporter:datatype="link"/>
3537                         <field name="create_time" reporter:datatype="timestamp" />
3538                         <field name="pos" reporter:datatype="int" />
3539                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3540                 </fields>
3541                 <links>
3542                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
3543                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3544             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
3545                 </links>
3546         </class>
3547         <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">
3548                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
3549                         <field name="id" reporter:datatype="id" />
3550                         <field name="item" reporter:datatype="link"/>
3551                         <field name="note" reporter:datatype="text" />
3552                 </fields>
3553                 <links>
3554                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
3555                 </links>
3556         </class>
3557         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
3558                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3559                         <field name="balance_owed" reporter:datatype="money" />
3560                         <field name="total_owed" reporter:datatype="money" />
3561                         <field name="total_paid" reporter:datatype="money" />
3562                         <field name="usr" reporter:datatype="link"/>
3563                 </fields>
3564                 <links>
3565                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3566                 </links>
3567         </class>
3568         <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">
3569                 <fields oils_persist:primary="code" oils_persist:sequence="">
3570                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
3571                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3572                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3573                 </fields>
3574                 <links/>
3575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3576             <actions>
3577                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3578                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
3579                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3580                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3581             </actions>
3582         </permacrud>
3583         </class>
3584         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
3585                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3586                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3587                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3588                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3589                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3590                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3591                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3592                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3593                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3594                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3595                 </fields>
3596                 <links>
3597                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3598                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3599                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3600                 </links>
3601         </class>
3602         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
3603                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3604                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3605                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3606                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3607                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3608                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3609                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3610                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3611                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3612                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3613                 </fields>
3614                 <links>
3615                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3616                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3617                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3618                 </links>
3619         </class>
3620         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
3621                 <fields oils_persist:primary="id" oils_persist:sequence="">
3622                         <field name="checkin_lib" reporter:datatype="link"/>
3623                         <field name="checkin_staff" reporter:datatype="link"/>
3624                         <field name="checkin_time" reporter:datatype="timestamp"/>
3625                         <field name="circ_lib"  reporter:datatype="org_unit"/>
3626                         <field name="circ_staff" reporter:datatype="link"/>
3627                         <field name="desk_renewal" reporter:datatype="bool"/>
3628                         <field name="due_date" reporter:datatype="timestamp"/>
3629                         <field name="duration" reporter:datatype="interval"/>
3630                         <field name="duration_rule" reporter:datatype="link"/>
3631                         <field name="fine_interval" reporter:datatype="interval"/>
3632                         <field name="id" reporter:datatype="id" />
3633                         <field name="max_fine" reporter:datatype="money" />
3634                         <field name="max_fine_rule" reporter:datatype="link"/>
3635                         <field name="opac_renewal" reporter:datatype="bool"/>
3636                         <field name="phone_renewal" reporter:datatype="bool"/>
3637                         <field name="recurring_fine" reporter:datatype="money" />
3638                         <field name="recurring_fine_rule" reporter:datatype="link"/>
3639                         <field name="renewal_remaining" reporter:datatype="int" />
3640                         <field name="stop_fines" reporter:datatype="text"/>
3641                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
3642                         <field name="target_copy" reporter:datatype="link"/>
3643                         <field name="usr" reporter:datatype="link"/>
3644                         <field name="xact_finish" reporter:datatype="timestamp" />
3645                         <field name="xact_start" reporter:datatype="timestamp" />
3646                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3647                 </fields>
3648                 <links>
3649                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3650                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3651                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3652                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3653                 </links>
3654         </class>
3655         <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">
3656                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
3657                         <field name="field" reporter:datatype="link"/>
3658                         <field name="id" reporter:datatype="id" />
3659                         <field name="source" reporter:datatype="link"/>
3660                         <field name="value" reporter:datatype="text"/>
3661                 </fields>
3662                 <links>
3663                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3664                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3665                 </links>
3666         </class>
3667         <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">
3668                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
3669                         <field name="high" reporter:datatype="money" />
3670                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3671                         <field name="low" reporter:datatype="money" />
3672                         <field name="name" reporter:datatype="text"/>
3673                         <field name="normal" reporter:datatype="money" />
3674                         <field name="recurrence_interval" reporter:datatype="interval"/>
3675                 </fields>
3676                 <links/>
3677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3678             <actions>
3679                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3680                 <retrieve/>
3681                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3682                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3683             </actions>
3684         </permacrud>
3685         </class>
3686         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
3687                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3688                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3689                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3690                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3691                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
3692                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
3693                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3694                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3695                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3696                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
3697                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3698                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3699                 </fields>
3700                 <links>
3701                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3702                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3703                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3704                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3705                 </links>
3706         </class>
3707         <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">
3708                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3709                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3710                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3711                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3712                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3713                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3714                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3715                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3716                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3717                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3718                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3719                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3720                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3721                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3722                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3723                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3724                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3725                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3726                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3727                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3728                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3729                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3730                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3731                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
3732                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3733                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3734                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3735                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3736                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3737                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3738                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3739                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3740                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3741                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3742                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3743                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3744                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3745                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3746                 </fields>
3747                 <links>
3748                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3749                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3750                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3751                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3752                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3753                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3754                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3755                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3756                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3757                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3758                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3759                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3760                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3761                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3762                 </links>
3763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3764             <actions>
3765                 <create permission="CREATE_COPY">
3766                     <context link="call_number" field="owning_lib"/>
3767                 </create>
3768                 <retrieve/>
3769                 <update permission="UPDATE_COPY">
3770                     <context link="call_number" field="owning_lib"/>
3771                 </update>
3772                 <delete permission="DELETE_COPY">
3773                     <context link="call_number" field="owning_lib"/>
3774                 </delete>
3775             </actions>
3776         </permacrud>
3777         </class>
3778         <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">
3779                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
3780                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
3781                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3782                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3783                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
3784                 </fields>
3785                 <links/>
3786         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3787             <actions>
3788                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3789                 <retrieve/>
3790                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3791                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3792             </actions>
3793         </permacrud>
3794         </class>
3795         <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">
3796                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
3797                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
3798                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3799                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3800                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
3801                 </fields>
3802                 <links/>
3803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3804             <actions>
3805                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3806                 <retrieve/>
3807                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3808                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3809             </actions>
3810         </permacrud>
3811         </class>
3812         <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">
3813                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
3814                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3815                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3816                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3817                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3818                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
3819                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
3820                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
3821                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
3822                 </fields>
3823                 <links>
3824                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
3825                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
3826                 </links>
3827         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3828             <actions>
3829                 <create permission="CREATE_PERM" global_required="true"/>
3830                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
3831                 <update permission="UPDATE_PERM" global_required="true"/>
3832                 <delete permission="DELETE_PERM" global_required="true"/>
3833             </actions>
3834         </permacrud>
3835         </class>
3836         <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">
3837                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
3838                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3839                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
3840                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
3841                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
3842                 </fields>
3843                 <links>
3844                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
3845                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
3846                 </links>
3847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3848             <actions>
3849                 <create permission="ADMIN_SURVEY">
3850                     <context link="question" jump="survey" field="owner"/>
3851                 </create>
3852                 <retrieve/>
3853                 <update permission="ADMIN_SURVEY">
3854                     <context link="question" jump="survey" field="owner"/>
3855                 </update>
3856                 <delete permission="ADMIN_SURVEY">
3857                     <context link="question" jump="survey" field="owner"/>
3858                 </delete>
3859             </actions>
3860         </permacrud>
3861         </class>
3862         <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">
3863                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
3864                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3865                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
3866                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
3867                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
3868                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
3869                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
3870                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
3871                 </fields>
3872                 <links>
3873                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
3874                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3875                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
3876                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3877                 </links>
3878         </class>
3879         <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">
3880                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3881                         <field name="balance_owed" reporter:datatype="money" />
3882                         <field name="total_owed" reporter:datatype="money" />
3883                         <field name="total_paid" reporter:datatype="money" />
3884                         <field name="usr" reporter:datatype="link"/>
3885                 </fields>
3886                 <links>
3887                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3888                 </links>
3889         </class>
3890         <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">
3891                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
3892                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
3893                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
3894                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
3895                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3896                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3897                 </fields>
3898                 <links>
3899                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3900                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3901                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3902                 </links>
3903         </class>
3904         <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">
3905                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
3906                         <field name="field" reporter:datatype="link"/>
3907                         <field name="id" reporter:datatype="id" />
3908                         <field name="source" reporter:datatype="link"/>
3909                         <field name="value" reporter:datatype="text"/>
3910                 </fields>
3911                 <links>
3912                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3913                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3914                 </links>
3915         </class>
3916         <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">
3917                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
3918                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3919                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
3920                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
3921                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
3922                 </fields>
3923                 <links>
3924                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
3925                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3926                 </links>
3927         </class>
3928         <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">
3929                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
3930                         <field name="depth" reporter:datatype="int" />
3931                         <field name="grantable" reporter:datatype="bool"/>
3932                         <field name="grp" reporter:datatype="link"/>
3933                         <field name="id" reporter:datatype="id" />
3934                         <field name="perm" reporter:datatype="link"/>
3935                 </fields>
3936                 <links>
3937                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3938                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3939                 </links>
3940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3941             <actions>
3942                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
3943                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
3944                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
3945                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
3946             </actions>
3947         </permacrud>
3948         </class>
3949         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
3950                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
3951                         <field name="items" oils_persist:virtual="true" />
3952                         <field name="btype" reporter:datatype="text"/>
3953                         <field name="id" reporter:datatype="id" />
3954                         <field name="name" reporter:datatype="text"/>
3955                         <field name="owner" reporter:datatype="link"/>
3956                         <field name="pub" reporter:datatype="bool"/>
3957                         <field name="create_time" reporter:datatype="timestamp" />
3958                 </fields>
3959                 <links>
3960                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3961                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
3962                 </links>
3963         </class>
3964         <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">
3965                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
3966                         <field name="id" reporter:datatype="id" />
3967                         <field name="bucket" reporter:datatype="link"/>
3968                         <field name="note" reporter:datatype="text" />
3969                 </fields>
3970                 <links>
3971                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
3972                 </links>
3973         </class>
3974         <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">
3975                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
3976                         <field name="id" reporter:datatype="int" />
3977                         <field name="usr" reporter:datatype="link"/>
3978                         <field name="work_ou" reporter:datatype="link"/>
3979                 </fields>
3980                 <links>
3981                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3982                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
3983                 </links>
3984         </class>
3985         <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">
3986                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
3987                         <field name="depth" reporter:datatype="int"/>
3988                         <field name="grantable" reporter:datatype="bool"/>
3989                         <field name="id" reporter:datatype="id" />
3990                         <field name="perm" reporter:datatype="link"/>
3991                         <field name="usr" reporter:datatype="link"/>
3992                 </fields>
3993                 <links>
3994                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3995                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3996                 </links>
3997         </class>
3998         <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">
3999                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
4000                         <field name="object_id" reporter:datatype="text"/>
4001                         <field name="grantable" reporter:datatype="bool"/>
4002                         <field name="id" reporter:datatype="id" />
4003                         <field name="perm" reporter:datatype="link"/>
4004                         <field name="usr" reporter:datatype="link"/>
4005                         <field name="object_type" reporter:datatype="text"/>
4006                 </fields>
4007                 <links>
4008                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4009                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4010                 </links>
4011         </class>
4012         <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">
4013                 <fields oils_persist:primary="id" oils_persist:sequence="">
4014                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4015                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4016                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4017                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4018                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4019                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4020                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4021                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4022                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4023                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4024                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4025                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4026                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4027                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4028                 </fields>
4029                 <links>
4030                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4031                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4032                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4033                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4034                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4035                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4036                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4037                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4038                 </links>
4039         </class>
4040         <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">
4041                 <fields oils_persist:primary="id" oils_persist:sequence="">
4042                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4043                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4044                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4045                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4046                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4047                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4048                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4049                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4050                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4051                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4052                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4053                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4054                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4055                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4056                 </fields>
4057                 <links>
4058                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4059                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4060                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4061                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4062                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4063                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4064                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4065                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4066                 </links>
4067         </class>
4068         <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">
4069                 <fields oils_persist:primary="id" oils_persist:sequence="">
4070                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4071                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4072                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4073                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4074                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4075                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4076                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4077                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4078                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4079                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4080                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4081                 </fields>
4082                 <links>
4083                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4084                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4085                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4086                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4087                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4088                 </links>
4089         </class>
4090         <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">
4091                 <fields oils_persist:primary="id" oils_persist:sequence="">
4092                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4093                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4094                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4095                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4096                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4097                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4098                         <field reporter:label="Accepting User" name="accepting_usr" />
4099                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
4100                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4101                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4102                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4103                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4104                 </fields>
4105                 <links>
4106                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4107                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4108                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4109                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4110                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4111                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4112                 </links>
4113         </class>
4114         <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">
4115                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
4116                         <field name="bucket" reporter:datatype="link"/>
4117                         <field name="id" reporter:datatype="id" />
4118                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
4119                         <field name="create_time" reporter:datatype="timestamp" />
4120                         <field name="pos" reporter:datatype="int" />
4121                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4122                 </fields>
4123                 <links>
4124                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
4125                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4126             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
4127                 </links>
4128         </class>
4129         <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">
4130                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
4131                         <field name="id" reporter:datatype="id" />
4132                         <field name="item" reporter:datatype="link"/>
4133                         <field name="note" reporter:datatype="text" />
4134                 </fields>
4135                 <links>
4136                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
4137                 </links>
4138         </class>
4139         <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">
4140                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
4141                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
4142                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4143                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4144                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4145                 </fields>
4146                 <links>
4147                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4148                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4149                 </links>
4150         </class>
4151
4152         <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">
4153                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
4154                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
4155                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4156                 </fields>
4157                 <links/>
4158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4159             <actions>
4160                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4161                 <retrieve/>
4162                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4163                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4164             </actions>
4165         </permacrud>
4166         </class>
4167
4168
4169         <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">
4170                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4171                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4172                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4173                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4174                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
4175                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4176                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4177                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4178                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4179                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4180                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4181                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4182                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4183                 </fields>
4184                 <links>
4185                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4186                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
4187                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4188                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4189                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4190                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4191                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4192                 </links>
4193         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4194             <actions>
4195                 <create permission="TRANSIT_COPY">
4196                     <context link="target_copy" field="owner"/>
4197                 </create>
4198                 <retrieve/>
4199                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4200                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4201             </actions>
4202         </permacrud>
4203         </class>
4204         <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">
4205                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4206                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4207                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4208                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4209                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
4210                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4211                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4212                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4213                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4214                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4215                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4216                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4217                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4218                 </fields>
4219                 <links>
4220                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4221                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4222                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4223                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4224                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4225                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4226                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4227                 </links>
4228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4229             <actions>
4230                 <create permission="TRANSIT_COPY" context_field="owner">
4231                     <context link="target_copy" field="circ_lib"/>
4232                 </create>
4233                 <retrieve/>
4234                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4235                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4236             </actions>
4237         </permacrud>
4238         </class>
4239         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
4240                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
4241                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4242                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
4243                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
4244                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
4245                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4246                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
4247                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4248                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
4249                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4250                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
4251                 </fields>
4252                 <links>
4253                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4254                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
4255                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
4256                 </links>
4257         </class>
4258         <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">
4259                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
4260                         <field name="grp" />
4261                         <field name="id" reporter:datatype="id" />
4262                         <field name="usr" />
4263                 </fields>
4264                 <links>
4265                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4266                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4267                 </links>
4268         </class>
4269         <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">
4270                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
4271                         <field name="id" reporter:datatype="id" />
4272                         <field name="fq_field" reporter:datatype="text"/>
4273                         <field name="identity_value" reporter:datatype="text"/>
4274                         <field name="translation" reporter:datatype="text"/>
4275                         <field name="string" reporter:datatype="text"/>
4276                 </fields>
4277                 <links>
4278                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
4279                 </links>
4280         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4281             <actions>
4282                 <create permission="CREATE_TRANSLATION" global_required="true"/>
4283                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
4284                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
4285                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
4286             </actions>
4287         </permacrud>
4288         </class>
4289         <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">
4290                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
4291                         <field name="id" reporter:datatype="id" />
4292                         <field name="fm_class" reporter:datatype="text"/>
4293                         <field name="field" reporter:datatype="text"/>
4294                         <field name="owner" reporter:datatype="org_unit"/>
4295                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
4296                 </fields>
4297                 <links>
4298                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4299                 </links>
4300         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4301             <actions>
4302                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4303                 <retrieve/>
4304                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4305                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4306             </actions>
4307         </permacrud>
4308         </class>
4309         <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">
4310                 <fields oils_persist:primary="code">
4311                         <field name="code" reporter:datatype="id" />
4312                         <field name="marc_code" reporter:datatype="text"/>
4313                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4314                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4315                 </fields>
4316                 <links/>
4317         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4318             <actions>
4319                 <create permission="CREATE_LOCALE" global_required="true"/>
4320                 <retrieve permission="CREATE_LOCALE UPDATE_LOCALE DELETE_LOCALE" global_required="true"/>
4321                 <update permission="UPDATE_LOCALE" global_required="true"/>
4322                 <delete permission="DELETE_LOCALE" global_required="true"/>
4323             </actions>
4324         </permacrud>
4325         </class>
4326         <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">
4327                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
4328                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4329                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
4330                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
4331             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
4332                 </fields>
4333                 <links>
4334                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4335                 </links>
4336         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4337             <actions>
4338                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
4339                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
4340                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
4341                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
4342             </actions>
4343         </permacrud>
4344         </class>
4345
4346         <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">
4347                 <fields oils_persist:primary="id">
4348                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4349                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4350                 </fields>
4351                 <links/>
4352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4353             <actions>
4354                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4355                 <retrieve/>
4356                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4357                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4358             </actions>
4359         </permacrud>
4360         </class>
4361
4362         <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">
4363                 <fields oils_persist:primary="id">
4364                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4365                         <field reporter:label="User" name="usr" reporter:datatype="link" />
4366                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
4367                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
4368                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
4369                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
4370                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
4371                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
4372                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
4373                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
4374                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
4375                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
4376                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
4377                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
4378                         <field reporter:label="Title" name="title" reporter:datatype="text" />
4379                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
4380                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4381                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
4382                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
4383                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
4384                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
4385                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
4386                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
4387                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
4388                         <field reporter:label="Need Before Date" name="need_before" reporter:datatype="timestamp" />
4389                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
4390                 </fields>
4391                 <links>
4392                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4393                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4394                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4395                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
4396                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
4397                         <link field="cancel_reason" reltype="might_have" key="id" map="" class="acqcr"/>
4398                 </links>
4399         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4400             <actions>
4401                 <create permission="user_request.create">
4402                     <context link="usr" field="home_ou"/>
4403                                 </create>
4404                 <retrieve permission="user_request.view">
4405                     <context link="usr" field="home_ou"/>
4406                                 </retrieve>
4407                 <update permission="user_request.update">
4408                     <context link="usr" field="home_ou"/>
4409                                 </update>
4410                 <delete permission="user_request.delete">
4411                     <context link="usr" field="home_ou"/>
4412                                 </delete>
4413             </actions>
4414         </permacrud>
4415         </class>
4416
4417         <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">
4418                 <fields oils_persist:primary="code">
4419                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
4420                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4421                 </fields>
4422                 <links/>
4423         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4424             <actions>
4425                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4426                 <retrieve/>
4427                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4428                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4429             </actions>
4430         </permacrud>
4431         </class>
4432
4433         <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">
4434                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
4435                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
4436                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
4437                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
4438                         <field reporter:label="Ratio" name="ratio" />
4439                 </fields>
4440                 <links>
4441                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
4442                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
4443                 </links>
4444                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4445                         <actions>
4446                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4447                                 <retrieve/>
4448                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4449                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4450                         </actions>
4451                 </permacrud>
4452         </class>
4453
4454         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
4455                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
4456                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4457                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4458                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4459                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4460                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4461                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
4462                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
4463                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
4464                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
4465                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
4466                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
4467                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4468                         <field reporter:label="Email" name="email" reporter:datatype="text" />
4469                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
4470                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
4471                         <field reporter:label="Default Claim Interval" name="default_claim_interval" reporter:datatype="interval" />
4472                 </fields>
4473                 <links>
4474                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4475                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4476             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
4477             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
4478                 </links>
4479         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4480             <actions>
4481                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
4482                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
4483                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
4484                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
4485             </actions>
4486         </permacrud>
4487         </class>
4488
4489         <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">
4490                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
4491                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
4492                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4493                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4494                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4495                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4496                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4497                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
4498                 </fields>
4499                 <links>
4500                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4501                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4502                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4503                 </links>
4504         </class>
4505
4506         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
4507                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
4508                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
4509                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
4510                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4511                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
4512                         <field reporter:label="Receive Date/Time" name="recv_date" reporter:datatype="timestamp" />
4513                         <field reporter:label="Receive Method" name="receive_method" reporter:datatype="link" />
4514                         <field reporter:label="Invoice Type" name="invoice_type" reporter:datatype="text" />
4515                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
4516                 </fields>
4517                 <links>
4518                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
4519                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4520                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
4521                         <link field="receive_method" reltype="has_a" key="id" map="" class="acqim"/>
4522                 </links>
4523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4524             <actions>
4525                 <create   permission="ADMIN_INVOICE" context_field="receiver"/>
4526                 <retrieve permission="ADMIN_INVOICE" context_field="receiver"/>
4527                 <update   permission="ADMIN_INVOICE" context_field="receiver"/>
4528                 <delete   permission="ADMIN_INVOICE" context_field="receiver"/>
4529             </actions>
4530         </permacrud>
4531         </class>
4532
4533         <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">
4534                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
4535                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4536                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
4537                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
4538                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
4539                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
4540                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
4541                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4542                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
4543                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
4544                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
4545                 </fields>
4546                 <links>
4547                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
4548                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4549                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4550                 </links>
4551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4552             <actions>
4553                 <create   permission="ADMIN_INVOICE">
4554                                         <context link="invoice" field="receiver"/>
4555                                 </create>
4556                 <retrieve permission="ADMIN_INVOICE">
4557                                         <context link="invoice" field="receiver"/>
4558                                 </retrieve>
4559                 <update   permission="ADMIN_INVOICE">
4560                                         <context link="invoice" field="receiver"/>
4561                                 </update>
4562                                 <delete   permission="ADMIN_INVOICE">
4563                                         <context link="invoice" field="receiver"/>
4564                                 </delete>
4565             </actions>
4566         </permacrud>
4567         </class>
4568
4569         <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">
4570                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
4571                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4572                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
4573                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
4574                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
4575                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
4576                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
4577                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4578                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4579                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
4580                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
4581                 </fields>
4582                 <links>
4583                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
4584                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4585                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
4586                 </links>
4587         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4588             <actions>
4589                 <create   permission="ADMIN_INVOICE">
4590                                         <context link="invoice" field="receiver"/>
4591                                 </create>
4592                 <retrieve permission="ADMIN_INVOICE">
4593                                         <context link="invoice" field="receiver"/>
4594                                 </retrieve>
4595                 <update   permission="ADMIN_INVOICE">
4596                                         <context link="invoice" field="receiver"/>
4597                                 </update>
4598                                 <delete   permission="ADMIN_INVOICE">
4599                                         <context link="invoice" field="receiver"/>
4600                                 </delete>
4601             </actions>
4602         </permacrud>
4603         </class>
4604
4605         <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">
4606                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
4607                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
4608                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4609                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4610                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4611                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4612                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4613                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
4614                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4615                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
4616                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
4617                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
4618                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
4619                 </fields>
4620                 <links>
4621                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4622                 </links>
4623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4624             <actions>
4625                 <create permission="ADMIN_PROVIDER">
4626                     <context link="provider" field="owner"/>
4627                 </create>
4628                 <retrieve permission="ADMIN_PROVIDER">
4629                     <context link="provider" field="owner"/>
4630                 </retrieve>
4631                 <update permission="ADMIN_PROVIDER">
4632                     <context link="provider" field="owner"/>
4633                 </update>
4634                 <delete permission="ADMIN_PROVIDER">
4635                     <context link="provider" field="owner"/>
4636                 </delete>
4637             </actions>
4638         </permacrud>
4639         </class>
4640
4641         <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">
4642                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
4643                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4644                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4645                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4646                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
4647                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
4648                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
4649         </fields>
4650                 <links>
4651                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4652                 </links>
4653         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4654             <actions>
4655                 <create permission="ADMIN_PROVIDER">
4656                     <context link="provider" field="owner"/>
4657                 </create>
4658                 <retrieve permission="ADMIN_PROVIDER">
4659                     <context link="provider" field="owner"/>
4660                 </retrieve>
4661                 <update permission="ADMIN_PROVIDER">
4662                     <context link="provider" field="owner"/>
4663                 </update>
4664                 <delete permission="ADMIN_PROVIDER">
4665                     <context link="provider" field="owner"/>
4666                 </delete>
4667             </actions>
4668         </permacrud>
4669     </class>
4670         <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">
4671                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
4672                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4673                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4674                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4675                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4676                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4677                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4678                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4679                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4680                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4681                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
4682                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4683                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
4684                 </fields>
4685                 <links>
4686                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
4687                 </links>
4688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4689             <actions>
4690                 <create permission="ADMIN_PROVIDER">
4691                     <context link="contact" jump='provider' field="owner"/>
4692                 </create>
4693                 <retrieve permission="ADMIN_PROVIDER">
4694                     <context link="contact" jump='provider' field="owner"/>
4695                 </retrieve>
4696                 <update permission="ADMIN_PROVIDER">
4697                     <context link="contact" jump='provider' field="owner"/>
4698                 </update>
4699                 <delete permission="ADMIN_PROVIDER">
4700                     <context link="contact" jump='provider' field="owner"/>
4701                 </delete>
4702             </actions>
4703         </permacrud>
4704         </class>
4705
4706         <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">
4707                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
4708                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
4709                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
4710                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
4711                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
4712                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
4713                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
4714                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
4715                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4716                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
4717                 </fields>
4718                 <links>
4719                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
4720                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
4721                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
4722                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
4723                 </links>
4724                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4725                 </permacrud>
4726         </class>
4727
4728         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
4729                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
4730                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4731                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
4732                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
4733                 </fields>
4734                 <links>
4735             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
4736                 </links>
4737                 <!--
4738                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4739                         But here's what it should look like if we ever do use pcrud.
4740                 -->
4741                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4742                         <actions>
4743                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4744                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4745                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4746                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4747                         </actions>
4748                 </permacrud>
4749         </class>
4750
4751         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
4752                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
4753                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4754                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
4755                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
4756                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
4757                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
4758                 </fields>
4759                 <links>
4760                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4761                 </links>
4762                 <!--
4763                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4764                         But here's what it should look like if we ever do use pcrud.
4765                 -->
4766                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4767                         <actions>
4768                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4769                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4770                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4771                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4772                         </actions>
4773                 </permacrud>
4774         </class>
4775
4776         <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">
4777                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
4778                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4779                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4780                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4781                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4782                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4783                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4784                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4785                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
4786                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4787                 </fields>
4788                 <links>
4789                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4790                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4791             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
4792             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
4793                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
4794                 </links>
4795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4796             <actions>
4797                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4798                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
4799                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4800                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4801             </actions>
4802         </permacrud>
4803         </class>
4804
4805         <class id="acqfscred" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">
4806                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
4807                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
4808                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
4809                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4810                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4811                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
4812                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
4813                 </fields>
4814                 <links>
4815                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4816                 </links>
4817         </class>
4818
4819         <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">
4820                 <fields oils_persist:primary="id">
4821                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
4822                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
4823                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
4824                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
4825                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
4826                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4827                 </fields>
4828                 <links>
4829                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4830                 </links>
4831                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4832                 </permacrud>
4833         </class>
4834
4835         <class id="acqfdeb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">
4836                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
4837                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
4838                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4839                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
4840                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
4841                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4842                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="text" />
4843                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
4844                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4845                 </fields>
4846                 <links>
4847                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4848                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4849                 </links>
4850         </class>
4851
4852         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
4853                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
4854                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4855                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
4856                         <field reporter:label="Name" name="name" reporter:datatype="text" />
4857                         <field reporter:label="Year" name="year" reporter:datatype="int" />
4858                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
4859                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4860                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
4861                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
4862                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
4863                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
4864                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
4865                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4866                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4867                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
4868                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
4869                 </fields>
4870                 <links>
4871                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4872                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4873             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
4874             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
4875             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
4876                 </links>
4877         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4878             <actions>
4879                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
4880                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
4881                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
4882                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
4883             </actions>
4884         </permacrud>
4885         </class>
4886
4887         <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">
4888                 <fields oils_persist:primary="fund">
4889                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4890                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
4891                 </fields>
4892                 <links>
4893                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4894                 </links>
4895         </class>
4896
4897         <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">
4898                 <fields oils_persist:primary="fund">
4899                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4900                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
4901                 </fields>
4902                 <links>
4903                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4904                 </links>
4905         </class>
4906
4907         <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">
4908                 <fields oils_persist:primary="fund">
4909                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4910                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
4911                 </fields>
4912                 <links>
4913                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4914                 </links>
4915         </class>
4916
4917         <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">
4918                 <fields oils_persist:primary="fund">
4919                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4920                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
4921                 </fields>
4922                 <links>
4923                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4924                 </links>
4925         </class>
4926
4927         <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">
4928                 <fields oils_persist:primary="fund">
4929                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4930                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
4931                 </fields>
4932                 <links>
4933                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4934                 </links>
4935         </class>
4936
4937    <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">
4938         <fields oils_persist:primary="fund">
4939             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4940             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
4941         </fields>
4942         <links>
4943             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4944         </links>
4945     </class>
4946
4947    <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">
4948         <fields oils_persist:primary="fund">
4949             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4950             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
4951         </fields>
4952         <links>
4953             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4954         </links>
4955     </class>
4956
4957    <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">
4958         <fields oils_persist:primary="fund">
4959             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4960             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
4961         </fields>
4962         <links>
4963             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4964         </links>
4965     </class>
4966
4967    <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">
4968         <fields oils_persist:primary="fund">
4969             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4970             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
4971         </fields>
4972         <links>
4973             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4974         </links>
4975     </class>
4976
4977    <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">
4978         <fields oils_persist:primary="fund">
4979             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4980             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
4981         </fields>
4982         <links>
4983             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4984         </links>
4985     </class>
4986
4987         <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">
4988                 <fields oils_persist:primary="funding_source">
4989                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4990                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
4991                 </fields>
4992                 <links>
4993                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4994                 </links>
4995         </class>
4996
4997         <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">
4998                 <fields oils_persist:primary="funding_source">
4999                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5000                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
5001                 </fields>
5002                 <links>
5003                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5004                 </links>
5005         </class>
5006
5007         <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">
5008                 <fields oils_persist:primary="funding_source">
5009                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5010                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
5011                 </fields>
5012                 <links>
5013                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5014                 </links>
5015         </class>
5016
5017         <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">
5018                 <fields oils_persist:primary="fund">
5019                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5020                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
5021                 </fields>
5022                 <links>
5023                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5024                 </links>
5025         </class>
5026
5027         <class id="acqfa" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">
5028                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
5029                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5030                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5031                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5032                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5033                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5034                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5035                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5036                 </fields>
5037                 <links>
5038                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5039                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5040                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5041                 </links>
5042         </class>
5043
5044     <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">
5045         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
5046             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5047             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5048             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5049             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
5050             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
5051             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5052             <field reporter:label="Note" name="note" reporter:datatype="text" />
5053             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5054         </fields>
5055         <links>
5056             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5057             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5058             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5059         </links>
5060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5061                         <actions>
5062                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5063                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5064                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5065                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5066                         </actions>
5067                 </permacrud>
5068     </class>
5069
5070         <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">
5071                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
5072                         <field reporter:label="Picklist ID" name="id" reporter:datatype="id" />
5073                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5074                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" />
5075                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5076                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5077                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5078                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
5079                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
5080                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5081                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5082                 </fields>
5083                 <links>
5084                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5085                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5086                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5087                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5088                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
5089                 </links>
5090         </class>
5091
5092         <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">
5093                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
5094                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5095                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
5096                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5097                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5098                 </fields>
5099                 <links>
5100                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5101                 </links>
5102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5103                         <actions>
5104                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5105                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
5106                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5107                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5108                         </actions>
5109                 </permacrud>
5110         </class>
5111
5112         <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">
5113                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
5114                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" />
5115                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5116                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5117                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5118                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5119                         <field reporter:label="State" name="state" reporter:datatype="text" />
5120                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
5121                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5122                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5123                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
5124                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5125                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5126                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
5127                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5128                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="link" />
5129                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
5130                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
5131                 </fields>
5132                 <links>
5133                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5134                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5135                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5136                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
5137                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5138                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
5139                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
5140                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5141                         <link field="cancel_reason" reltype="might_have" key="id" map="" class="acqcr"/>
5142                 </links>
5143                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5144                         <actions>
5145                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5146                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5147                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5148                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5149                         </actions>
5150                 </permacrud>
5151         </class>
5152
5153         <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">
5154                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
5155                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5156                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5157                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5158                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
5159                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
5160                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5161                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5162                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
5163                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5164                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5165                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5166                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5167                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
5168                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5169                 </fields>
5170                 <links>
5171                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
5172                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5173                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5174                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5175                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5176                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5177                 </links>
5178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5179             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5180                 </permacrud>
5181         </class>
5182
5183         <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">
5184                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
5185                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5186                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5187                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5188                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5189                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5190                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5191                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
5192                 </fields>
5193                 <links>
5194                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5195                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5196                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5197                 </links>
5198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5199             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5200                 <context link="purchase_order" field="ordering_agency"/>
5201             </retrieve>
5202             <create permission="CREATE_PURCHASE_ORDER">
5203                 <context link="purchase_order" field="ordering_agency"/>
5204             </create>
5205             <update permission="CREATE_PURCHASE_ORDER">
5206                 <context link="purchase_order" field="ordering_agency"/>
5207             </update>
5208             <delete permission="CREATE_PURCHASE_ORDER">
5209                 <context link="purchase_order" field="ordering_agency"/>
5210             </delete>
5211                 </permacrud>
5212         </class>
5213
5214         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
5215                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
5216                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
5217                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
5218                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link" />
5219                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5220                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5221                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5222                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5223                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
5224                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
5225                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
5226                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
5227                         <field reporter:label="State" name="state" reporter:datatype="text" />
5228                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5229                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5230                         <field reporter:label="Claim Interval" name="claim_interval" reporter:datatype="interval" />
5231                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5232                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
5233                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
5234                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
5235                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
5236                 </fields>
5237                 <links>
5238                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5239                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5240                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5241                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5242                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5243                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5244                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5245                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
5246                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
5247                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
5248                         <link field="cancel_reason" reltype="might_have" key="id" map="" class="acqcr"/>
5249                 </links>
5250                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5251             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
5252                 <context link="purchase_order" field="ordering_agency"/>
5253                 <context link="picklist" field="org_unit"/>
5254             </retrieve>
5255                 </permacrud>
5256         </class>
5257
5258         <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">
5259                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
5260                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5261                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5262                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5263                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
5264                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5265                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5266                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
5267                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5268                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5269                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link"/>
5270                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
5271                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5272                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5273                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5274                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
5275                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
5276                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
5277                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5278                 </fields>
5279                 <links>
5280                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
5281                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5282                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5283                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5284                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5285                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5286                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5287                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5288                 </links>
5289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5290             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5291                 <context link="purchase_order" field="ordering_agency"/>
5292                 <context link="picklist" field="org_unit"/>
5293             </retrieve>
5294                 </permacrud>
5295         </class>
5296
5297         <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">
5298                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
5299                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
5300                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
5301                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5302                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
5303                 </fields>
5304                 <links>
5305                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5306                 </links>
5307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5308                         <actions>
5309                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5310                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
5311                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5312                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5313                         </actions>
5314                 </permacrud>
5315         </class>
5316
5317         <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">
5318                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
5319                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
5320                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
5321                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5322                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5323                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5324                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5325                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5326                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
5327                 </fields>
5328                 <links>
5329                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5330                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5331                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5332                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
5333                 </links>
5334         </class>
5335
5336         <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">
5337                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
5338                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
5339                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
5340                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
5341                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
5342                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
5343                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
5344                 </fields>
5345                 <links>
5346                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5347                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
5348                 </links>
5349         </class>
5350
5351         <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">
5352                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
5353                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
5354                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5355                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
5356                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
5357                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
5358                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
5359                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5360                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
5361                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
5362                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
5363                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
5364                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5365                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
5366                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5367                 </fields>
5368                 <links>
5369                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5370                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
5371                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5372                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5373                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5374                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5375                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5376                         <link field="cancel_reason" reltype="might_have" key="id" map="" class="acqcr"/>
5377                 </links>
5378         </class>
5379
5380         <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">
5381                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5382                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5383                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5384                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5385                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5386                 </fields>
5387                 <links/>
5388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5389                         <actions>
5390                                 <retrieve />
5391                         </actions>
5392                 </permacrud>
5393         </class>
5394
5395         <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">
5396                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5397                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5398                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5399                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5400                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5401                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5402             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5403                 </fields>
5404                 <links/>
5405         <permacrud>
5406             <actions>
5407                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5408                 <retrieve />
5409                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5410                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5411             </actions>
5412         </permacrud>
5413         </class>
5414
5415         <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">
5416                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5417                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5418                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5419                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5420                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5421                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5422                 </fields>
5423                 <links/>
5424         </class>
5425         <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">
5426                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5427                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5428                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5429                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5430                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5431                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5432                 </fields>
5433                 <links>
5434                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5435                 </links>
5436         </class>
5437
5438         <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">
5439             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5440                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5441                 <field reporter:label="Code" name="code" reporter:datatype="text" />
5442                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5443                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5444                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5445                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5446         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5447
5448             </fields>
5449             <links>
5450                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5451             </links>
5452             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5453                 <actions>
5454                     <create permission="ADMIN_PROVIDER">
5455                         <context link="provider" field="owner"/>
5456                     </create>
5457                     <retrieve permission="ADMIN_PROVIDER">
5458                         <context link="provider" field="owner"/>
5459                     </retrieve>
5460                     <update permission="ADMIN_PROVIDER">
5461                         <context link="provider" field="owner"/>
5462                     </update>
5463                     <delete permission="ADMIN_PROVIDER">
5464                         <context link="provider" field="owner"/>
5465                     </delete>
5466                 </actions>
5467             </permacrud>
5468         </class>
5469         
5470         <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">
5471             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
5472                 <field reporter:label="ID" name="id" reporter:datatype="id" />
5473                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5474                 <field reporter:label="Name" name="name" reporter:datatype="text" />
5475                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
5476             </fields>
5477             <links>
5478                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5479             </links>
5480             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5481                 <actions>
5482                     <create permission="ADMIN_PROVIDER">
5483                         <context link="provider" field="owner"/>
5484                     </create>
5485                     <retrieve permission="ADMIN_PROVIDER">
5486                         <context link="provider" field="owner"/>
5487                     </retrieve>
5488                     <update permission="ADMIN_PROVIDER">
5489                         <context link="provider" field="owner"/>
5490                     </update>
5491                     <delete permission="ADMIN_PROVIDER">
5492                         <context link="provider" field="owner"/>
5493                     </delete>
5494                 </actions>
5495             </permacrud>
5496         </class>
5497         
5498         <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">
5499             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5500                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5501                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5502                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5503                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5504                 </fields>
5505                 <links/>
5506         </class>
5507
5508         <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">
5509                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
5510                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID"/>
5511                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
5512                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
5513                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
5514                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
5515                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
5516                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
5517                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
5518                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
5519                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
5520                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
5521                 </fields>
5522                 <links>
5523                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5524                 </links>
5525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5526             <actions>
5527                 <create permission="ADMIN_PROVIDER">
5528                     <context link="provider" field="owner"/>
5529                 </create>
5530                 <retrieve permission="ADMIN_PROVIDER">
5531                     <context link="provider" field="owner"/>
5532                 </retrieve>
5533                 <update permission="ADMIN_PROVIDER">
5534                     <context link="provider" field="owner"/>
5535                 </update>
5536                 <delete permission="ADMIN_PROVIDER">
5537                     <context link="provider" field="owner"/>
5538                 </delete>
5539             </actions>
5540         </permacrud>
5541         </class>
5542
5543         <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">
5544                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
5545                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
5546                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
5547                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
5548                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
5549                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
5550                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
5551                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
5552                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
5553                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
5554                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
5555                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
5556                 </fields>
5557                 <links>
5558                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
5559                 </links>
5560         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5561             <actions>
5562                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5563                     <context link="account" jump="provider" field="owner"/>
5564                 </retrieve>
5565                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5566                     <context link="account" jump="provider" field="owner"/>
5567                 </update>
5568                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5569                     <context link="account" jump="provider" field="owner"/>
5570                 </delete>
5571             </actions>
5572         </permacrud>
5573         </class>
5574
5575
5576         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
5577                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
5578                         <field name="id" reporter:datatype="id" />
5579                         <field name="parent" reporter:datatype="link"/>
5580                         <field name="owner" reporter:datatype="link"/>
5581                         <field name="create_time" reporter:datatype="timestamp"/>
5582                         <field name="name" reporter:datatype="text"/>
5583                         <field name="shared" reporter:datatype="bool"/>
5584                         <field name="share_with" reporter:datatype="link"/>
5585                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5586                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
5587                 </fields>
5588                 <links>
5589                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5590                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
5591                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
5592                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5593                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
5594                 </links>
5595         </class>
5596         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
5597                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
5598                         <field name="id" reporter:datatype="id" />
5599                         <field name="parent" reporter:datatype="link"/>
5600                         <field name="owner" reporter:datatype="link"/>
5601                         <field name="create_time" reporter:datatype="timestamp"/>
5602                         <field name="name" reporter:datatype="text"/>
5603                         <field name="shared" reporter:datatype="bool"/>
5604                         <field name="share_with" reporter:datatype="link"/>
5605                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5606                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
5607                 </fields>
5608                 <links>
5609                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5610                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
5611                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
5612                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5613                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
5614                 </links>
5615         </class>
5616         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
5617                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
5618                         <field name="id" reporter:datatype="id" />
5619                         <field name="parent" reporter:datatype="link"/>
5620                         <field name="owner" reporter:datatype="link"/>
5621                         <field name="create_time" reporter:datatype="timestamp"/>
5622                         <field name="name" reporter:datatype="text"/>
5623                         <field name="shared" reporter:datatype="bool"/>
5624                         <field name="share_with" reporter:datatype="link"/>
5625                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5626                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
5627                 </fields>
5628                 <links>
5629                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5630                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
5631                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
5632                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5633                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
5634                 </links>
5635         </class>
5636         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
5637                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
5638                         <field name="id" reporter:datatype="id" />
5639                         <field name="owner" reporter:datatype="link"/>
5640                         <field name="create_time" reporter:datatype="timestamp"/>
5641                         <field name="name" reporter:datatype="text"/>
5642                         <field name="data" reporter:datatype="text"/>
5643                         <field name="folder" reporter:datatype="link"/>
5644                         <field name="description" reporter:datatype="text"/>
5645                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
5646                 </fields>
5647                 <links>
5648                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5649                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
5650                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
5651                 </links>
5652         </class>
5653         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
5654                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
5655                         <field name="id" reporter:datatype="id" />
5656                         <field name="owner" reporter:datatype="link"/>
5657                         <field name="create_time" reporter:datatype="timestamp"/>
5658                         <field name="template" reporter:datatype="link"/>
5659                         <field name="data" reporter:datatype="link"/>
5660                         <field name="folder" reporter:datatype="link"/>
5661                         <field name="recur" reporter:datatype="bool"/>
5662                         <field name="recurrence" reporter:datatype="interval"/>
5663                         <field name="name" reporter:datatype="text"/>
5664                         <field name="description" reporter:datatype="text"/>
5665                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
5666                 </fields>
5667                 <links>
5668                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5669                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
5670                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
5671                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
5672                 </links>
5673         </class>
5674         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
5675                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
5676                         <field name="id" reporter:datatype="id" />
5677                         <field name="runner" reporter:datatype="link"/>
5678                         <field name="start_time" reporter:datatype="timestamp"/>
5679                         <field name="complete_time" reporter:datatype="timestamp"/>
5680                         <field name="run_time" reporter:datatype="timestamp"/>
5681                         <field name="email" reporter:datatype="text"/>
5682                         <field name="excel_format" reporter:datatype="bool"/>
5683                         <field name="csv_format" reporter:datatype="bool"/>
5684                         <field name="html_format" reporter:datatype="bool"/>
5685                         <field name="error_code" reporter:datatype="int"/>
5686                         <field name="error_text" reporter:datatype="text"/>
5687                         <field name="report" reporter:datatype="link"/>
5688                         <field name="folder" reporter:datatype="link"/>
5689                         <field name="chart_pie" reporter:datatype="bool"/>
5690                         <field name="chart_bar" reporter:datatype="bool"/>
5691                         <field name="chart_line" reporter:datatype="bool"/>
5692                 </fields>
5693                 <links>
5694                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
5695                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
5696                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
5697                 </links>
5698         </class>
5699         <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">
5700                 <fields oils_persist:primary="id">
5701                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5702                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5703                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5704                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5705                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5706                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5707                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5708                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5709                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5710                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5711                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5712                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5713                 </fields>
5714                 <links>
5715                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5716                 </links>
5717         </class>
5718         <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">
5719                 <fields oils_persist:primary="id">
5720                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5721                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5722                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5723                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5724                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5725                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5726                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5727                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5728                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5729                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5730                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5731                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5732                 </fields>
5733                 <links>
5734                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5735                 </links>
5736         </class>
5737         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
5738                 <fields oils_persist:primary="id">
5739                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5740                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
5741                         <field reporter:label="Fingerprint" name="fingerprint" />
5742                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5743                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5744                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5745                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5746                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
5747                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5748                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5749                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5750                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
5751                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
5752                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
5753                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5754                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5755                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
5756                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
5757                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
5758                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
5759                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
5760                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
5761                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5762                 </fields>
5763                 <links>
5764                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
5765                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5766                 </links>
5767         </class>
5768         <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">
5769                 <fields oils_persist:primary="id">
5770                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
5771                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
5772                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
5773                 </fields>
5774                 <links>
5775                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
5776                 </links>
5777         </class>
5778         <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">
5779                 <fields oils_persist:primary="id">
5780                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
5781                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
5782                 </fields>
5783                 <links>
5784                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
5785                 </links>
5786         </class>
5787         <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">
5788                 <fields oils_persist:primary="id">
5789                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5790                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
5791                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
5792                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
5793                 </fields>
5794                 <links>
5795                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
5796                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
5797                 </links>
5798         </class>
5799         <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">
5800                 <fields oils_persist:primary="xact">
5801                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5802                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
5803                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
5804                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
5805                 </fields>
5806                 <links>
5807                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5808                 </links>
5809         </class>
5810         <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">
5811                 <fields oils_persist:primary="xact">
5812                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5813                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
5814                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
5815                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
5816                 </fields>
5817                 <links>
5818                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5819                 </links>
5820         </class>
5821         <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)">
5822                 <fields oils_persist:primary="id">
5823                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
5824                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
5825                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
5826                 </fields>
5827                 <links>
5828                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
5829                 </links>
5830         </class>
5831         <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">
5832                 <fields oils_persist:primary="id">
5833                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
5834                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
5835                 </fields>
5836                 <links>
5837                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
5838                 </links>
5839         </class>
5840         <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">
5841                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
5842                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
5843                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
5844                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
5845                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
5846                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5847                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
5848                 </fields>
5849                 <links>
5850                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5851                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
5852                 </links>
5853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5854                         <actions>
5855                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5856                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5857                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5858                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5859                         </actions>
5860                 </permacrud>
5861         </class>
5862         <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">
5863                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
5864                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
5865                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
5866                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
5867                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
5868                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5869                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5870                 </fields>
5871                 <links>
5872                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
5873                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5874                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5875                 </links>
5876                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5877                         <actions>
5878                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
5879                                         <context link="formula" field="owner"/>
5880                                 </create>
5881                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
5882                                         <context link="formula" field="owner"/>
5883                                 </retrieve>
5884                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
5885                                         <context link="formula" field="owner"/>
5886                                 </update>
5887                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
5888                                         <context link="formula" field="owner"/>
5889                                 </delete>
5890                         </actions>
5891                 </permacrud>
5892         </class>
5893
5894         <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">
5895                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
5896                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5897                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5898                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5899                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
5900                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
5901                 </fields>
5902                 <links>
5903                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5904                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
5905                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5906                 </links>
5907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5908                         <actions>
5909                                 <create permission="CREATE_PURCHASE_ORDER">
5910                                         <context link="formula" field="owner"/>
5911                 </create>
5912                                 <retrieve permission="CREATE_PURCHASE_ORDER">
5913                                         <context link="formula" field="owner"/>
5914                 </retrieve>
5915                                 <update permission="CREATE_PURCHASE_ORDER">
5916                                         <context link="formula" field="owner"/>
5917                 </update>
5918                                 <delete permission="CREATE_PURCHASE_ORDER">
5919                                         <context link="formula" field="owner"/>
5920                 </delete>
5921                         </actions>
5922                 </permacrud>
5923         </class>
5924
5925         <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">
5926                 <fields oils_persist:primary="id">
5927                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
5928                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5929                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
5930                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
5931                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
5932                 </fields>
5933                 <links>
5934                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5935                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
5936                 </links>
5937                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5938                 </permacrud>
5939         </class>
5940
5941     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
5942         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
5943             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5944             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5945             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5946             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
5947             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5948             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
5949             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
5950             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
5951             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
5952             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
5953             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
5954             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
5955             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
5956             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
5957             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5958         </fields>
5959     </class>
5960
5961     <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">
5962         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
5963             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5964             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5965             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5966             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5967             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5968         </fields>
5969     </class>
5970
5971     <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">
5972         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
5973             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5974             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5975             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5976             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
5977             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
5978             <field reporter:label="City" name="city" reporter:datatype="text"/>
5979             <field reporter:label="State" name="state" reporter:datatype="text"/>
5980             <field reporter:label="Country" name="country" reporter:datatype="text"/>
5981             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5982             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5983         </fields>
5984     </class>
5985
5986     <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">
5987         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
5988             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5989             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5990             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5991             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
5992             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
5993             <field reporter:label="City" name="city" reporter:datatype="text"/>
5994             <field reporter:label="State" name="state" reporter:datatype="text"/>
5995             <field reporter:label="Country" name="country" reporter:datatype="text"/>
5996             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5997             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5998         </fields>
5999     </class>
6000
6001     <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">
6002         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
6003             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6004             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6005             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6006             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
6007             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
6008             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6009         </fields>
6010     </class>
6011
6012     <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">
6013                 <oils_persist:source_definition>
6014
6015             SELECT  u.hold,
6016                     c.circ_lib,
6017                     count(*)
6018               FROM  action.unfulfilled_hold_list u
6019                     JOIN asset.copy c ON (c.id = u.current_copy)
6020               GROUP BY 1,2
6021
6022                 </oils_persist:source_definition>
6023         <fields>
6024             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6025             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6026             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6027         </fields>
6028                 <links>
6029                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6030                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6031                 </links>
6032     </class>
6033
6034     <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">
6035                 <oils_persist:source_definition>
6036
6037             SELECT  hold,
6038                     min(count)
6039               FROM  action.unfulfilled_hold_loops
6040               GROUP BY 1
6041
6042                 </oils_persist:source_definition>
6043         <fields>
6044             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6045             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
6046         </fields>
6047                 <links>
6048                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6049                 </links>
6050     </class>
6051
6052     <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">
6053                 <oils_persist:source_definition>
6054
6055             SELECT  DISTINCT l.*
6056               FROM  action.unfulfilled_hold_loops l
6057                     JOIN action.unfulfilled_hold_min_loop m USING (hold)
6058               WHERE l.count = m.min
6059
6060                 </oils_persist:source_definition>
6061         <fields>
6062             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6063             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6064             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6065         </fields>
6066                 <links>
6067                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6068                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6069                 </links>
6070     </class>
6071
6072     <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">
6073                 <oils_persist:source_definition>
6074
6075             SELECT  hold,
6076                     max(count)
6077               FROM  action.unfulfilled_hold_loops
6078               GROUP BY 1
6079
6080                 </oils_persist:source_definition>
6081         <fields>
6082             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6083             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
6084         </fields>
6085                 <links>
6086                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6087                 </links>
6088     </class>
6089
6090     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:tablename="action.unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
6091                 <oils_persist:source_definition>
6092
6093             SELECT  DISTINCT l.*
6094               FROM  action.unfulfilled_hold_loops l
6095                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
6096               WHERE l.count = m.max
6097
6098                 </oils_persist:source_definition>
6099         <fields>
6100             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6101             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6102             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6103         </fields>
6104                 <links>
6105                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6106                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6107                 </links>
6108     </class>
6109
6110         <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">
6111                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
6112                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
6113                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
6114                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
6115                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
6116                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="int"/>
6117                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="int"/>
6118                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="int"/>
6119                 </fields>
6120                 <links>
6121                 </links>
6122                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6123                 </permacrud>
6124         </class>
6125
6126         <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">
6127                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
6128                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
6129                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
6130                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6131                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
6132                 </fields>
6133                 <links>
6134                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
6135                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
6136                 </links>
6137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6138                 </permacrud>
6139         </class>
6140
6141         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
6142                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
6143                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
6144                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
6145                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
6146                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
6147                 </fields>
6148                 <links>
6149                 </links>
6150                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6151                 </permacrud>
6152         </class>
6153
6154         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
6155                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
6156                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
6157                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
6158                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6159                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
6160                 </fields>
6161                 <links>
6162                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
6163                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
6164                 </links>
6165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6166                 </permacrud>
6167         </class>
6168         
6169         <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">
6170                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
6171                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
6172                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
6173                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
6174                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
6175                 </fields>
6176                 <links>
6177                         <link field="return_type" reltype="might_have" key="id" map="" class="qdt"/>
6178                 </links>
6179                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6180                 </permacrud>
6181         </class>
6182         
6183         <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">
6184                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
6185                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
6186                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6187                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6188                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
6189                 </fields>
6190                 <links>
6191                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6192                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
6193                 </links>
6194                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6195                 </permacrud>
6196         </class>
6197
6198         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
6199                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6200                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6201                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
6202                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6203                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6204                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6205                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6206                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6207                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6208                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6209                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6210                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6211                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6212                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6213                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
6214                 </fields>
6215                 <links>
6216                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6217                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6218                         <link field="right_operand" reltype="might_have" key="id" map="" class="qxp"/>
6219                         <link field="function_id" reltype="might_have" key="id" map="" class="qfs"/>
6220                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6221                         <link field="cast_type" reltype="might_have" key="id" map="" class="qdt"/>
6222                 </links>
6223                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6224                 </permacrud>
6225         </class>
6226
6227         <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">
6228                 <fields oils_persist:primary="id" oils_persist:sequence="case_branch_id_seq">
6229                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
6230                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6231                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6232                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
6233                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
6234                 </fields>
6235                 <links>
6236                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6237                         <link field="condition" reltype="might_have" key="id" map="" class="qxp"/>
6238                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
6239                 </links>
6240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6241                 </permacrud>
6242         </class>
6243
6244         <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">
6245                 <fields oils_persist:primary="id" oils_persist:sequence="from_relation_id_seq">
6246                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
6247                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
6248                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
6249                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
6250                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
6251                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
6252                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6253                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
6254                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6255                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
6256                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
6257                 </fields>
6258                 <links>
6259                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6260                         <link field="function_call" reltype="might_have" key="id" map="" class="qxp"/>
6261                         <link field="parent_relation" reltype="might_have" key="id" map="" class="qfr"/>
6262                         <link field="on_clause" reltype="might_have" key="id" map="" class="qxp"/>
6263                 </links>
6264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6265                 </permacrud>
6266         </class>
6267
6268         <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">
6269                 <fields oils_persist:primary="id" oils_persist:sequence="record_column_id_seq">
6270                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
6271                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
6272                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6273                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6274                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
6275                 </fields>
6276                 <links>
6277                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
6278                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
6279                 </links>
6280                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6281                 </permacrud>
6282         </class>
6283
6284         <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">
6285                 <fields oils_persist:primary="id" oils_persist:sequence="select_item_id_seq">
6286                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
6287                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
6288                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6289                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
6290                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
6291                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
6292                 </fields>
6293                 <links>
6294                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6295                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
6296                 </links>
6297                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6298                 </permacrud>
6299         </class>
6300
6301         <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">
6302                 <fields oils_persist:primary="id" oils_persist:sequence="order_by_item_id_seq">
6303                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
6304                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
6305                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6306                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
6307                 </fields>
6308                 <links>
6309                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6310                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
6311                 </links>
6312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6313                 </permacrud>
6314         </class>
6315
6316         <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">
6317                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6318                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6319                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6320                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6321                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6322                 </fields>
6323                 <links>
6324                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6325                 </links>
6326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6327                 </permacrud>
6328         </class>
6329
6330         <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">
6331                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6332                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6333                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6334                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6335                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6336                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6337                 </fields>
6338                 <links>
6339                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6340                 </links>
6341                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6342                 </permacrud>
6343         </class>
6344
6345         <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">
6346                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6347                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6348                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6349                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6350                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6351                 </fields>
6352                 <links>
6353                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6354                 </links>
6355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6356                 </permacrud>
6357         </class>
6358
6359         <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">
6360                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6361                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6362                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6363                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6364                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6365                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6366                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
6367                 </fields>
6368                 <links>
6369                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6370                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6371                         <link field="cast_type" reltype="might_have" key="id" map="" class="qdt"/>
6372                 </links>
6373                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6374                 </permacrud>
6375         </class>
6376
6377         <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">
6378                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6379                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6380                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6381                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6382                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6383                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6384                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6385                 </fields>
6386                 <links>
6387                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6388                 </links>
6389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6390                 </permacrud>
6391         </class>
6392
6393         <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">
6394                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6395                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6396                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6397                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6398                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6399                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6400                 </fields>
6401                 <links>
6402                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6403                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6404                 </links>
6405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6406                 </permacrud>
6407         </class>
6408
6409         <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">
6410                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6411                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6412                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6413                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6414                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6415                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6416                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6417                 </fields>
6418                 <links>
6419                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6420                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6421                 </links>
6422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6423                 </permacrud>
6424         </class>
6425
6426         <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">
6427                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6428                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6429                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6430                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6431                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6432                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6433                 </fields>
6434                 <links>
6435                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6436                         <link field="function_id" reltype="might_have" key="id" map="" class="qfs"/>
6437                 </links>
6438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6439                 </permacrud>
6440         </class>
6441
6442         <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">
6443                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6444                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6445                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6446                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6447                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6448                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6449                 </fields>
6450                 <links>
6451                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6452                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6453                 </links>
6454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6455                 </permacrud>
6456         </class>
6457
6458         <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">
6459                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6460                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6461                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6462                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6463                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6464                 </fields>
6465                 <links>
6466                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6467                 </links>
6468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6469                 </permacrud>
6470         </class>
6471
6472         <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">
6473                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6474                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6475                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6476                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6477                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6478                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6479                 </fields>
6480                 <links>
6481                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6482                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6483                 </links>
6484                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6485                 </permacrud>
6486         </class>
6487
6488         <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">
6489                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6490                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6491                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6492                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6493                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6494                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6495                 </fields>
6496                 <links>
6497                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6498                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6499                 </links>
6500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6501                 </permacrud>
6502         </class>
6503
6504         <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">
6505                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6506                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6507                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6508                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6509                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6510                 </fields>
6511                 <links>
6512                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6513                 </links>
6514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6515                 </permacrud>
6516         </class>
6517
6518         <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">
6519                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6520                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6521                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6522                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6523                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6524                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6525                 </fields>
6526                 <links>
6527                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6528                 </links>
6529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6530                 </permacrud>
6531         </class>
6532
6533         <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">
6534                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6535                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6536                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6537                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6538                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6539                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6540                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6541                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6542                 </fields>
6543                 <links>
6544                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6545                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6546                         <link field="right_operand" reltype="might_have" key="id" map="" class="qxp"/>
6547                 </links>
6548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6549                 </permacrud>
6550         </class>
6551
6552         <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">
6553                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6554                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6555                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6556                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6557                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6558                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6559                 </fields>
6560                 <links>
6561                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6562                 </links>
6563                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6564                 </permacrud>
6565         </class>
6566
6567         <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">
6568                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6569                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6570                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6571                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6572                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6573                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6574                 </fields>
6575                 <links>
6576                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6577                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6578                 </links>
6579                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6580                 </permacrud>
6581         </class>
6582
6583         <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">
6584                 <fields oils_persist:primary="id">
6585                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
6586                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
6587                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
6588                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
6589                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6590                 </fields>
6591                 <links>
6592                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
6593                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
6594                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
6595                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6596                 </links>
6597         </class>
6598
6599         <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">
6600                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
6601                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6602                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
6603                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
6604                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
6605                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
6606                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
6607                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
6608                 </fields>
6609                 <links/>
6610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6611                         <actions>
6612                                 <retrieve/>
6613                         </actions>
6614                 </permacrud>
6615         </class>
6616
6617         <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">
6618                 <fields oils_persist:primary="ptype_key">
6619                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
6620                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6621                 </fields>
6622                 <links/>
6623                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6624                         <actions>
6625                                 <retrieve/>
6626                         </actions>
6627                 </permacrud>
6628         </class>
6629
6630         <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">
6631                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
6632                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6633                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
6634                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
6635                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
6636                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
6637                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6638                 </fields>
6639                 <links>
6640                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
6641                 </links>
6642                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6643                         <actions>
6644                                 <retrieve/>
6645                         </actions>
6646                 </permacrud>
6647         </class>
6648
6649         <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">
6650                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
6651                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6652                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6653                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
6654                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6655                 </fields>
6656                 <links>
6657                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
6658                 </links>
6659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6660                         <actions>
6661                                 <retrieve/>
6662                         </actions>
6663                 </permacrud>
6664         </class>
6665
6666         <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">
6667                 <fields oils_persist:primary="code">
6668                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
6669                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
6670                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
6671                 </fields>
6672                 <links/>
6673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6674                         <actions>
6675                                 <retrieve/>
6676                         </actions>
6677                 </permacrud>
6678         </class>
6679
6680         <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">
6681                 <oils_persist:source_definition>
6682
6683             SELECT  b.id,
6684                     MAX(dcp.edit_date) AS last_delete_date
6685              FROM   biblio.record_entry b
6686                     JOIN asset.call_number cn ON (cn.record = b.id)
6687                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
6688              WHERE  NOT b.deleted
6689              GROUP BY b.id
6690              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
6691
6692                 </oils_persist:source_definition>
6693                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
6694                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
6695                         <field reporter:label="Delete Date/Time" name="copy_delete_date" reporter:datatype="timestamp"/>
6696                 </fields>
6697                 <links>
6698                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6699                 </links>
6700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6701                         <actions>
6702                                 <retrieve/>
6703                         </actions>
6704                 </permacrud>
6705         </class>
6706
6707
6708         <!-- ********************************************************************************************************************* -->
6709         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
6710         <!-- ********************************************************************************************************************* -->
6711         <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">
6712                 <fields oils_persist:primary="id">
6713                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
6714                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
6715                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
6716                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6717                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
6718                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
6719                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
6720                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
6721                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
6722                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
6723                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
6724                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
6725                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
6726                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
6727                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
6728                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
6729                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
6730                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
6731                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
6732                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
6733                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
6734                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
6735                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
6736                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
6737                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
6738                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
6739                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
6740                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
6741                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
6742                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
6743                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
6744                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
6745                 </fields>
6746                 <links>
6747                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6748                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
6749                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
6750                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
6751                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6752                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
6753                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
6754                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
6755                 </links>
6756         </class>
6757
6758         <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">
6759                 <fields oils_persist:primary="id">
6760                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
6761                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6762                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6763                 </fields>
6764                 <links>
6765                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6766                 </links>
6767         </class>
6768
6769         <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">
6770                 <fields oils_persist:primary="id">
6771                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
6772                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6773                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6774                 </fields>
6775                 <links>
6776                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6777                 </links>
6778         </class>
6779
6780         <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">
6781                 <fields oils_persist:primary="id">
6782                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6783
6784                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
6785                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
6786                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
6787
6788                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
6789                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
6790                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
6791
6792                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
6793                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
6794
6795                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6796                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6797                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
6798
6799                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
6800                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
6801
6802                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
6803                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
6804                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
6805
6806                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
6807                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
6808                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
6809
6810                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
6811                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
6812                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
6813                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
6814
6815                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
6816                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
6817
6818                 </fields>
6819                 <links>
6820                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
6821                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6822                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6823                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6824                 </links>
6825         </class>
6826
6827         <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">
6828                 <oils_persist:source_definition>
6829
6830                         SELECT  t.*
6831                           FROM  action.transit_copy t
6832                                 JOIN actor.org_unit AS s ON (t.source = s.id)
6833                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
6834                           WHERE s.parent_ou &lt;&gt; d.parent_ou
6835
6836                 </oils_persist:source_definition>
6837                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6838                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
6839                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
6840                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6841                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
6842                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
6843                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
6844                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
6845                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6846                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6847                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6848                 </fields>
6849                 <links>
6850                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
6851                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6852                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6853                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6854                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6855                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
6856                 </links>
6857         </class>
6858
6859     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
6860                 <oils_persist:source_definition>
6861
6862         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
6863                 SELECT
6864                         cp.id as copy,
6865                         COUNT(circ.id),
6866                         EXTRACT(YEAR FROM circ.xact_start) AS year,
6867                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
6868                 FROM
6869                         asset.copy cp
6870                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
6871                 GROUP BY 1, 3, 4
6872                 UNION
6873                 SELECT
6874                         cp.id as copy,
6875                         COUNT(circ.id),
6876                         EXTRACT(YEAR FROM circ.xact_start) AS year,
6877                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
6878                 FROM
6879                         asset.copy cp
6880                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
6881                 GROUP BY 1, 3, 4
6882                 UNION
6883                 SELECT
6884                         id as copy,
6885                         circ_count,
6886                         -1 AS year,
6887                         false as is_renewal
6888                 FROM
6889                         extend_reporter.legacy_circ_count
6890         )x GROUP BY 1, 3, 4
6891
6892                 </oils_persist:source_definition>
6893         <fields>
6894             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
6895             <field reporter:label="Count" name="count" reporter:datatype="int"/>
6896             <field reporter:label="Year" name="year" reporter:datatype="int"/>
6897             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
6898         </fields>
6899                 <links>
6900                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
6901                 </links>
6902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6903                         <actions>
6904                                 <retrieve/>
6905                         </actions>
6906                 </permacrud>
6907     </class>
6908
6909         <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">
6910                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6911                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
6912                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
6913                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
6914                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6915                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
6916                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
6917                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
6918                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
6919                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
6920                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
6921                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
6922                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
6923                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
6924                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
6925                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
6926                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
6927                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
6928                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
6929                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
6930                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
6931                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
6932                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
6933                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
6934                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
6935                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6936                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6937                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6938                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
6939                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
6940                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
6941                 </fields>
6942                 <links>
6943                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6944                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
6945                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
6946                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6947                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
6948                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6949                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6950                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6951                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6952                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6953                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6954                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6955                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
6956                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6957                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6958                 </links>
6959         </class>
6960
6961     <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">
6962         <fields oils_persist:primary="id">
6963             <field reporter:label="Title" name="title" reporter:datatype="text"/>
6964             <field reporter:label="Author" name="author" reporter:datatype="text"/>
6965             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
6966             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6967             <field reporter:label="Price" name="price" reporter:datatype="money"/>
6968             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6969             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
6970             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
6971             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
6972             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
6973             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
6974             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
6975             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
6976             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
6977             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
6978             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
6979             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6980             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6981             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
6982             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
6983             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6984             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6985             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6986             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
6987             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6988             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
6989             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
6990             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
6991             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
6992             <field reporter:label="Status" name="status" reporter:datatype="link"/>
6993             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
6994             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
6995             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
6996             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
6997         </fields>
6998         <links>
6999             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7000             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7001             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7002             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7003             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7004         </links>
7005     </class>
7006
7007     <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">
7008         <fields oils_persist:primary="id">
7009             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7010             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7011             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7012             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7013         </fields>
7014         <links>
7015             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7016             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7017         </links>
7018     </class>
7019
7020     <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">
7021         <fields oils_persist:primary="owning_lib">
7022             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7023             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7024             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7025         </fields>
7026         <links>
7027             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7028         </links>
7029     </class>
7030
7031     <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">
7032         <fields oils_persist:primary="id">
7033             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7034             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7035             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7036             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7037             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7038         </fields>
7039         <links>
7040             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7041             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7042             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7043         </links>
7044     </class>
7045
7046     <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">
7047         <fields oils_persist:primary="circ_lib">
7048             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7049             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7050             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7051             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7052         </fields>
7053         <links>
7054             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7055             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7056         </links>
7057     </class>
7058
7059     <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">
7060         <fields oils_persist:primary="id">
7061             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7062             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7063             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7064             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7065             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7066         </fields>
7067         <links>
7068             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7069             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7070             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7071         </links>
7072     </class>
7073
7074     <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">
7075         <fields oils_persist:primary="home_ou">
7076             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7077             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7078             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7079             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7080         </fields>
7081         <links>
7082             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7083             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7084         </links>
7085     </class>
7086         <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">
7087                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
7088                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
7089                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
7090                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
7091                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7092                 </fields>
7093                 <links>
7094                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7095                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
7096                 </links>
7097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7098                         <actions>
7099                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7100                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
7101                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7102                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7103                         </actions>
7104                 </permacrud>
7105         </class>
7106         <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">
7107                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
7108                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
7109                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
7110                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
7111                 </fields>
7112                 <links>
7113                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7114                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
7115                         </links>
7116                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7117                 <actions>
7118                                 <create permission="ADMIN_ACQ_FUND_TAG">
7119                                         <context link="tag" field="owner"/>
7120                                 </create>
7121                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7122                                         <context link="tag" field="owner"/>
7123                                 </retrieve>
7124                                 <update permission="ADMIN_ACQ_FUND_TAG">
7125                                         <context link="tag" field="owner"/>
7126                                 </update>
7127                                 <delete permission="ADMIN_ACQ_FUND_TAG">
7128                                         <context link="tag" field="owner"/>
7129                                 </delete>
7130                         </actions>
7131                 </permacrud>
7132         </class>
7133
7134         <!-- ********************************************************************************************************************* -->
7135
7136 </IDL>
7137
7138 <!--
7139     vim:noet:ts=4:sw=4:
7140 -->