]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Represent a subfield expression as a variant of a function call
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                 </fields>
88         </class>
89
90         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
91                 <fields>
92                         <field name="err_msg" oils_persist:virtual="true" />
93                         <field name="type" oils_persist:virtual="true" />
94                 </fields>
95         </class>
96
97         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
98                 <fields>
99                         <field name="err_msg" oils_persist:virtual="true" />
100                         <field name="type" oils_persist:virtual="true" />
101                 </fields>
102         </class>
103
104         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
105                 <fields oils_persist:primary="matchpoint">
106                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
107                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
108                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
109                 </fields>
110                 <links>
111                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
112                 </links>
113         </class>
114
115         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
116         <!-- when the time is right, turn me into a view.  -->
117                 <fields>
118             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
119             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
120             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
121             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
122             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
123             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
124             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
125             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
127             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" datatype="timestamp"/>
128                 </fields>
129         </class>
130
131
132         <!-- Actually in the DB -->
133         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
134                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
135                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
136                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
137                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
138                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
139                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
140                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
141                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
142                 </fields>
143                 <links>
144                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
145                 </links>
146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
147                         <actions>
148                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
149                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
150                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
151                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
152                         </actions>
153                 </permacrud>
154         </class>
155
156         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
157                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
158                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
159                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
160                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
164                 </links>
165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
166                         <actions>
167                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
168                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
169                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
170                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
171                         </actions>
172                 </permacrud>
173         </class>
174
175         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
176                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
177                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
178                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
179                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
180                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
181                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
182                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
183                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
184                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
185                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
186                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
187                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
188                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
189                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
190                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
191                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
192                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
193                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
194                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
195                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
196                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
197                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
198                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
199                 </fields>
200                 <links>
201                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
202                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
203                 </links>
204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
205                         <actions>
206                                 <create permission="CREATE_IMPORT_ITEM">
207                     <context link="definition" field="owner"/>
208                                 </create>
209                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
210                     <context link="definition" field="owner"/>
211                                 </retrieve>
212                                 <update permission="UPDATE_IMPORT_ITEM">
213                     <context link="definition" field="owner"/>
214                                 </update>
215                                 <delete permission="DELETE_IMPORT_ITEM">
216                     <context link="definition" field="owner"/>
217                                 </delete>
218                         </actions>
219                 </permacrud>
220         </class>
221
222         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
223                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
224                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
225                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
226                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
227                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
228                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
229                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
230                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
231                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
232                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
233                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
234                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
235                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
236                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
237                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
238                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
239                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
240                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
241                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
242                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
243                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
244                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
245                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
246                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
247                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
248                 </fields>
249                 <links>
250                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
251                 </links>
252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
253                         <actions>
254                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
255                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
256                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
257                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
258                         </actions>
259                 </permacrud>
260         </class>
261
262         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
263                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
264                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
265                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
266                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
267                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
268                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
269                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
270                 </fields>
271                 <links>
272                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
273                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
274                 </links>
275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
276                         <actions>
277                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
278                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
279                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
280                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
281                         </actions>
282                 </permacrud>
283         </class>
284
285         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
286                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
287                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
288                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
289                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
290                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
291                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
292                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
293                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
294                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
295                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
296                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
297                 </fields>
298                 <links>
299                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
300                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
301                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
302             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
303             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
304                 </links>
305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
306                         <actions>
307                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
308                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
309                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
310                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
311                         </actions>
312                 </permacrud>
313         </class>
314
315         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
316                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
317                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
318                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
319                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
320                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
321                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
322                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
323                 </fields>
324                 <links/>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
328                 <retrieve/>
329                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
330                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
336                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
337                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
338                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
339                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
340                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
341                 </fields>
342                 <links>
343                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
344                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
345                 </links>
346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
347                         <actions>
348                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
349                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
350                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
351                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
352                         </actions>
353                 </permacrud>
354         </class>
355
356         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
357                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
358                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
359                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
360                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
361                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
362                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
363                 </fields>
364                 <links>
365                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
366                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
367                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
368                 </links>
369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
370                         <actions>
371                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
372                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
373                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
374                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
375                         </actions>
376                 </permacrud>
377         </class>
378
379         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
380                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
381                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
382                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
383                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
384                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
385                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
386                 </fields>
387                 <links>
388                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
389                 </links>
390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
391                         <actions>
392                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
393                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
394                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
395                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
396                         </actions>
397                 </permacrud>
398         </class>
399
400         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
401                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
402                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
403                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
404                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
405                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
406                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
407                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
408                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
409                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
410                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
411                 </fields>
412                 <links>
413                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
414                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
415             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
416             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
417                 </links>
418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
419                         <actions>
420                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
421                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
422                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
423                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
424                         </actions>
425                 </permacrud>
426         </class>
427
428         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
429                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
430                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
431                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
432                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
433                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
434                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
435                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
436                 </fields>
437                 <links/>
438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
439                         <actions>
440                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
441                 <retrieve/>
442                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
443                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
444                         </actions>
445                 </permacrud>
446         </class>
447
448         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
449                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
450                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
451                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
452                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
453                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
454                 </fields>
455                 <links>
456                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
457                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
458                 </links>
459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
460                         <actions>
461                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
462                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
463                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
464                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
465                         </actions>
466                 </permacrud>
467         </class>
468
469         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
470                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
471                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
472                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
473                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
474                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
475                 </fields>
476                 <links>
477                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
478                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
479                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
480                 </links>
481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
482                         <actions>
483                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
484                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
485                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
486                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
487                         </actions>
488                 </permacrud>
489         </class>
490
491
492         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
493                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
494                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
495                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
496                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
497                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
498                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
499                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
500                 </fields>
501                 <links>
502                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
503                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
504                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
505                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
506                 </links>
507         </class>
508
509     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
510         <fields oils_persist:primary="name">
511             <field reporter:label="Name" name="name" reporter:datatype="text"/>
512             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
513             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
514             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
515         </fields>
516         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
517             <actions>
518                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
519                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
520                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
521                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
522             </actions>
523         </permacrud>
524     </class>
525
526     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
527         <fields oils_persist:primary="id">
528             <field reporter:label="ID" name="id" reporter:datatype="id"/>
529             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
530             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
531             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
532             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
533         </fields>
534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
535             <actions>
536                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
537                 <retrieve/>
538                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
539                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
540             </actions>
541         </permacrud>
542     </class>
543
544         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
545                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
546                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
547                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
548                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
549                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
550                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
551                 </fields>
552                 <links>
553                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
554                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
555                 </links>
556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
557             <actions>
558                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
559                 <retrieve/>
560                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
561                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
562             </actions>
563         </permacrud>
564         </class>
565
566         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
567                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
568                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
569                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
570                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
571                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
572                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
573                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
574                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
575                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
576                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
577                 </fields>
578                 <links>
579                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
580                 </links>
581         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
582             <actions>
583                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
584                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
585                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
586                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
587             </actions>
588         </permacrud>
589         </class>
590
591     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
592         <fields oils_persist:primary="name">
593             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
594             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
595             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
596             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
597             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
598             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
599             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
600             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
601             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
602         </fields>
603         <links>
604             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
605         </links>
606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
607             <actions>
608                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
609                 <retrieve/>
610                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
611                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
612             </actions>
613         </permacrud>
614     </class>
615
616     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
617         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
618             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
619             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
620             <field reporter:label="Name" name="name" reporter:datatype="text"/>
621             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
622             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
623             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
624             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
625         </fields>
626         <links>
627             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
628         </links>
629     </class>
630
631         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
632                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
633                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
634                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
635                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
636                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
637                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
638                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
639                 </fields>
640                 <links>
641             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
642             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
643                 </links>
644                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
645                         <actions>
646                                 <retrieve/>
647                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
648                         </actions>
649                 </permacrud>
650         </class>
651
652         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
653                 <fields oils_persist:primary="key">
654                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
655                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
656                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
657                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
658                 </fields>
659                 <links/>
660                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
661                         <actions>
662                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
663                                 <retrieve/>
664                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
665                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
666                         </actions>
667                 </permacrud>
668         </class>
669
670         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
671                 <fields oils_persist:primary="module">
672                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
673                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
674                 </fields>
675                 <links/>
676         </class>
677
678         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
679                 <fields oils_persist:primary="module">
680                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
681                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
682                 </fields>
683                 <links/>
684                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
685                         <actions>
686                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
687                                 <retrieve/>
688                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
689                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
690                         </actions>
691                 </permacrud>
692         </class>
693
694         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
695                 <fields oils_persist:primary="module">
696                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
697                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
698                 </fields>
699                 <links/>
700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
701                         <actions>
702                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
703                                 <retrieve/>
704                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
705                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
706                         </actions>
707                 </permacrud>
708         </class>
709
710         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
711                 <fields oils_persist:primary="module">
712                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
713                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
714                 </fields>
715                 <links/>
716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
717                         <actions>
718                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
719                                 <retrieve/>
720                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
721                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
722                         </actions>
723                 </permacrud>
724         </class>
725
726         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
727                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
728                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
729                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
730                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
731                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
732                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
733                 </fields>
734                 <links>
735                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
736                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
737                 </links>
738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
739                         <actions>
740                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
741                     <context link="event_def" field="owner"/>
742                 </create>
743                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
744                     <context link="event_def" field="owner"/>
745                 </retrieve>
746                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
747                     <context link="event_def" field="owner"/>
748                 </update>
749                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
750                     <context link="event_def" field="owner"/>
751                 </delete>
752                         </actions>
753                 </permacrud>
754         </class>
755
756         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
757                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
758                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
759                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
760                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
761                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
762                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
763                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
764                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
765                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
766                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
767                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
768                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
769                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
770                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
771                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
772                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
773                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
774                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
775                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
776                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
777                 </fields>
778                 <links>
779                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
780                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
781                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
782                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
783                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
784                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
785                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
786                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
787                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
792                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
793                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
794                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
795                         </actions>
796                 </permacrud>
797         </class>
798
799         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
800                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
801                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
802                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
803                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
804                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
805                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
806                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
807                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
808                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
809                         <field reporter:label="State" name="state" reporter:datatype="text"/>
810                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
811                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
812                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
813                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
814                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
815                 </fields>
816                 <links>
817                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
818                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
819                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
820                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
821                 </links>
822         </class>
823
824         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
825                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
826                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
827                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
828                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
829                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
830                 </fields>
831                 <links>
832                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
833                 </links>
834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
835                         <actions>
836                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
837                     <context link="event_def" field="owner"/>
838                 </create>
839                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
840                     <context link="event_def" field="owner"/>
841                 </retrieve>
842                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
843                     <context link="event_def" field="owner"/>
844                 </update>
845                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
846                     <context link="event_def" field="owner"/>
847                 </delete>
848                         </actions>
849                 </permacrud>
850         </class>
851
852         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
853                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
854                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
855                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
856                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
857                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
858                 </fields>
859                 <links>
860                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
861                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
862                 </links>
863         </class>
864
865         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
866                 <fields oils_persist:primary="code">
867                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
868                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
869                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
870                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
871                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
872                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
873                 </fields>
874                 <links/>
875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
876             <actions>
877                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
878                 <retrieve/>
879                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
880                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
881             </actions>
882         </permacrud>
883         </class>
884
885         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
886                 <fields oils_persist:primary="code">
887                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
888                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
889                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
890                 </fields>
891                 <links/>
892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
893             <actions>
894                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
895                 <retrieve/>
896                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
897                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
898             </actions>
899         </permacrud>
900         </class>
901
902         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
903                 <fields oils_persist:primary="code">
904                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
905                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
906                 </fields>
907                 <links/>
908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
909             <actions>
910                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
911                 <retrieve/>
912                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
913                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
914             </actions>
915         </permacrud>
916         </class>
917
918         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
919                 <fields oils_persist:primary="code">
920                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
921                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
922                 </fields>
923                 <links/>
924         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
925             <actions>
926                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
927                 <retrieve/>
928                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
929                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
930             </actions>
931         </permacrud>
932         </class>
933
934         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
935                 <fields oils_persist:primary="code">
936                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
937                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
938                 </fields>
939                 <links/>
940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
941             <actions>
942                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
943                 <retrieve/>
944                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
945                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
946             </actions>
947         </permacrud>
948         </class>
949
950         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
951                 <fields oils_persist:primary="code">
952                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
953                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
954                 </fields>
955                 <links/>
956         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
957             <actions>
958                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
959                 <retrieve/>
960                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
961                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
962             </actions>
963         </permacrud>
964         </class>
965
966         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
967                 <fields oils_persist:primary="code">
968                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
969                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
970                 </fields>
971                 <links/>
972         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
973             <actions>
974                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
975                 <retrieve/>
976                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
977                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
978             </actions>
979         </permacrud>
980         </class>
981
982         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
983                 <fields oils_persist:primary="code">
984                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
985                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
986                 </fields>
987                 <links/>
988         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
989             <actions>
990                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
991                 <retrieve/>
992                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
993                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
994             </actions>
995         </permacrud>
996         </class>
997
998         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
999                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1000                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1001                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1002                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1003                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1004                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1005                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1006                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1007                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1008                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1009                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1010                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1011                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1012                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1013                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1014                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1015                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1016                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1017                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1018                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1019                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1020                 </fields>
1021                 <links>
1022                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1023                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1024                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1025                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1026                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1027                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1028                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1029                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1030                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1031                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1032                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1033                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1034             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1035                 </links>
1036         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1037             <actions>
1038                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1039                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1040                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1041                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1042             </actions>
1043         </permacrud>
1044         </class>
1045
1046         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1047                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1048                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1049                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1050                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1051                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1052                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link"/>
1053                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1054                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1055                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1056                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1057                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1058                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1059                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1060                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1061                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1062                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1063                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1064                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1065                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1066                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1067                 </fields>
1068                 <links>
1069                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1070                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1071                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1072                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1073                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1074                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1075                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1076                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1077                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1078                 </links>
1079         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1080             <actions>
1081                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1082                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1083                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1084                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1085             </actions>
1086         </permacrud>
1087         </class>
1088
1089         <class id="ccmcmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test" oils_persist:tablename="config.circ_matrix_circ_mod_test" reporter:label="Circulation Matrix Circulation Modifier Subtest">
1090                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1091                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1092                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1093                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1094                 </fields>
1095                 <links>
1096                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1097                 </links>
1098         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1099             <actions>
1100                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1101                     <context link="matchpoint" field="org_unit"/>
1102                 </create>
1103                 <retrieve/>
1104                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1105                     <context link="matchpoint" field="org_unit"/>
1106                 </update>
1107                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1108                     <context link="matchpoint" field="org_unit"/>
1109                 </delete>
1110             </actions>
1111         </permacrud>
1112         </class>
1113
1114         <class id="ccmcmtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test_map" oils_persist:tablename="config.circ_matrix_circ_mod_test_map" reporter:label="Circulation Matrix Circulation Modifier Subtest Circulation Modifier Set">
1115                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1116                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1117                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1118                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1119                 </fields>
1120                 <links>
1121                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1122                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1123                 </links>
1124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1125             <actions>
1126                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1127                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1128                 </create>
1129                 <retrieve/>
1130                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1131                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1132                 </update>
1133                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1134                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1135                 </delete>
1136             </actions>
1137         </permacrud>
1138         </class>
1139
1140         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
1141                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1142                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1143                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1144                 </fields>
1145                 <links/>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1149                 <retrieve/>
1150                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1151                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1152             </actions>
1153         </permacrud>
1154         </class>
1155
1156         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
1157                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1158                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1159                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1160                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1161                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1162                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1163                 </fields>
1164                 <links>
1165                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1166                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1167                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1168                 </links>
1169         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1170             <actions>
1171                 <create permission="ADMIN_SURVEY">
1172                     <context link="survey" field="owner"/>
1173                 </create>
1174                 <retrieve/>
1175                 <update permission="ADMIN_SURVEY">
1176                     <context link="survey" field="owner"/>
1177                 </update>
1178                 <delete permission="ADMIN_SURVEY">
1179                     <context link="survey" field="owner"/>
1180                 </delete>
1181             </actions>
1182         </permacrud>
1183         </class>
1184         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1185                 <fields oils_persist:primary="id" oils_persist:sequence="">
1186                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1187                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1188                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1189                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1190                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1191                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1192                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1193                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1194                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1195                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1196                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1197                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1198                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1199                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1200                 </fields>
1201                 <links>
1202                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1203                 </links>
1204         </class>
1205         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
1206                 <fields oils_persist:primary="id" oils_persist:sequence="">
1207                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1208                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1209                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1210                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1211                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1212                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1213                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1214                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1215                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1216                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1217                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1218                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1219                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1220                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1221                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1222                 </fields>
1223                 <links>
1224                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1225                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1226                 </links>
1227         </class>
1228         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1229                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1230                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1231                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1232                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1233                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1234                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1235                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1236                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1237                 </fields>
1238                 <links>
1239                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1240                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1241                 </links>
1242         </class>
1243         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
1244                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1245                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1246                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1247                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1248                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1249                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1250                 </fields>
1251                 <links>
1252                         <link field="usr" reltype="has_a" key="id" class="au"/>
1253                 </links>
1254         </class>
1255         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1256                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1257                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1258                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1259                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1260                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1261                 </fields>
1262                 <links>
1263                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1264                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1265                 </links>
1266         </class>
1267         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
1268                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1269                         <field name="field" reporter:datatype="link"/>
1270                         <field name="id" reporter:datatype="id" />
1271                         <field name="source" reporter:datatype="link"/>
1272                         <field name="value" reporter:datatype="text"/>
1273                 </fields>
1274                 <links>
1275                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1276                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1277                 </links>
1278         </class>
1279         <class id="aihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
1280                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1281                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1282                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1283                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1284                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1285                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1286                 </fields>
1287                 <links>
1288                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1289                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1290                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1291                 </links>
1292         </class>
1293         <class id="ancihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
1294                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1295                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1296                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1297                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1298                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1299                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1300                 </fields>
1301                 <links>
1302                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1303                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1304                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1305                 </links>
1306         </class>
1307         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
1308                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1309                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1310                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1311                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1312                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1313                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1314                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1315                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1316                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1317                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1318                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1319                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1320                 </fields>
1321                 <links>
1322                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1323                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1324                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1325                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1326                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1327                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1328                 </links>
1329         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1330             <actions>
1331                 <create permission="TRANSIT_COPY" context_field="owner">
1332                     <context link="target_copy" field="circ_lib"/>
1333                 </create>
1334                 <retrieve/>
1335                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1336                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1337             </actions>
1338         </permacrud>
1339         </class>
1340         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
1341                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1342                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1343                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1344                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1345                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1346                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1347                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1348                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1349                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1350                 </fields>
1351                 <links>
1352                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1353                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1354                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1355                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1356                 </links>
1357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1358             <actions>
1359                 <create permission="ADMIN_SURVEY">
1360                     <context link="survey" field="owner"/>
1361                 </create>
1362                 <retrieve/>
1363                 <update permission="ADMIN_SURVEY">
1364                     <context link="survey" field="owner"/>
1365                 </update>
1366                 <delete permission="ADMIN_SURVEY">
1367                     <context link="survey" field="owner"/>
1368                 </delete>
1369             </actions>
1370         </permacrud>
1371         </class>
1372         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
1373                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1374                         <field name="bucket" />
1375                         <field name="id" reporter:datatype="id" />
1376                         <field name="target_copy" reporter:datatype="link"/>
1377                         <field name="create_time" reporter:datatype="timestamp" />
1378                         <field name="pos" reporter:datatype="int" />
1379                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1380                 </fields>
1381                 <links>
1382                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1383                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1384             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1385                 </links>
1386         </class>
1387         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
1388                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1389                         <field name="id" reporter:datatype="id" />
1390                         <field name="item" reporter:datatype="link"/>
1391                         <field name="note" reporter:datatype="text" />
1392                 </fields>
1393                 <links>
1394                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1395                 </links>
1396         </class>
1397         <class id="are" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1398                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1399                         <field name="active" reporter:datatype="bool"/>
1400                         <field name="arn_source" />
1401                         <field name="arn_value" />
1402                         <field name="create_date" reporter:datatype="timestamp"/>
1403                         <field name="creator" />
1404                         <field name="deleted" reporter:datatype="bool"/>
1405                         <field name="edit_date" reporter:datatype="timestamp"/>
1406                         <field name="editor" />
1407                         <field name="id" reporter:datatype="id" />
1408                         <field name="last_xact_id" />
1409                         <field name="marc" />
1410                         <field name="source" />
1411                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1412                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1413                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1414                 </fields>
1415                 <links>
1416                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1417                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1418                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1419                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1420                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1421                 </links>
1422         </class>
1423         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1424                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1425                         <field name="char_encoding" />
1426                         <field name="id" />
1427                         <field name="record" />
1428                         <field name="record_status" />
1429                 </fields>
1430                 <links>
1431                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1432                 </links>
1433         </class>
1434         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
1435                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1436                         <field name="id" reporter:datatype="id" />
1437                         <field name="bib" reporter:datatype="link" />
1438                         <field name="authority" reporter:datatype="link" />
1439                 </fields>
1440                 <links>
1441                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1442                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1443                 </links>
1444         </class>
1445         <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">
1446                 <fields oils_persist:primary="code" oils_persist:sequence="">
1447                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1448                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1449                 </fields>
1450                 <links/>
1451         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1452             <actions>
1453                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1454                 <retrieve/>
1455                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1456                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1457             </actions>
1458         </permacrud>
1459         </class>
1460         <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">
1461                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1462                         <field name="accepting_usr" />
1463                         <field name="amount" reporter:datatype="money" />
1464                         <field name="amount_collected" reporter:datatype="money" />
1465                         <field name="approval_code" reporter:datatype="text"/>
1466                         <field name="cash_drawer" reporter:datatype="link"/>
1467                         <field name="cc_number" reporter:datatype="text"/>
1468                         <field name="cc_type" reporter:datatype="text"/>
1469                         <field name="cc_processor" reporter:datatype="text"/>
1470                         <field name="expire_month" reporter:datatype="int" />
1471                         <field name="expire_year" reporter:datatype="int" />
1472                         <field name="id" reporter:datatype="id" />
1473                         <field name="note" reporter:datatype="text"/>
1474                         <field name="payment_ts" reporter:datatype="timestamp"/>
1475                         <field name="xact" reporter:datatype="link"/>
1476                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1477                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1478                 </fields>
1479                 <links>
1480                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1481                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1482                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1483                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1484                 </links>
1485         </class>
1486         <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">
1487                 <fields oils_persist:primary="name">
1488                         <field reporter:label="Field Class" name="field_class" />
1489                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1490                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1491                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1492                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1493                 </fields>
1494                 <links/>
1495         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1496             <actions>
1497                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1498                 <retrieve/>
1499                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1500                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1501             </actions>
1502         </permacrud>
1503         </class>
1504
1505         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias">
1506                 <fields oils_persist:primary="alias">
1507                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1508                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1509                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1510                 </fields>
1511                 <links>
1512                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1513                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1514                 </links>
1515         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1516             <actions>
1517                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1518                 <retrieve/>
1519                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1520                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1521             </actions>
1522         </permacrud>
1523         </class>
1524
1525         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class">
1526                 <fields oils_persist:primary="name">
1527                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1528                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1529                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1530                 </fields>
1531                 <links>
1532                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1533                 </links>
1534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1535             <actions>
1536                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1537                 <retrieve/>
1538                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1539                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1540             </actions>
1541         </permacrud>
1542         </class>
1543
1544         <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">
1545                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1546                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1547                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1548                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1549                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1550                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1551                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1552                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1553                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1554                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1555                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1556                 </fields>
1557                 <links>
1558                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1559                 </links>
1560         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1561             <actions>
1562                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1563                 <retrieve/>
1564                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1565                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1566             </actions>
1567         </permacrud>
1568         </class>
1569         <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">
1570                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1571                         <field name="id" reporter:datatype="id" />
1572                         <field name="name" reporter:datatype="text"/>
1573                         <field name="xpath" reporter:datatype="text"/>
1574                         <field name="format" reporter:datatype="link"/>
1575                         <field name="first_word" reporter:datatype="bool" />
1576                 </fields>
1577                 <links/>
1578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1579             <actions>
1580                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1581                 <retrieve/>
1582                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1583                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1584             </actions>
1585         </permacrud>
1586         </class>
1587         <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">
1588                 <fields oils_persist:primary="code" oils_persist:sequence="">
1589                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1590                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1591                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1592                 </fields>
1593                 <links/>
1594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1595             <actions>
1596                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1597                 <retrieve/>
1598                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1599                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1600             </actions>
1601         </permacrud>
1602         </class>
1603         <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">
1604                 <fields oils_persist:primary="code" oils_persist:sequence="">
1605                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1606                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1607                 </fields>
1608                 <links/>
1609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1610             <actions>
1611                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1612                 <retrieve/>
1613                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1614                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1615             </actions>
1616         </permacrud>
1617         </class>
1618         <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">
1619                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1620                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1621                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1622                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1623                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1624                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1625                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1626                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1627                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1628                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1629                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1630                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1631                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1632                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1633                 </fields>
1634                 <links>
1635                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1636                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1637                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1638                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1639                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1640                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1641                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1642                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1643                 </links>
1644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1645             <actions>
1646                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1647                 <retrieve/>
1648                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1649                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1650             </actions>
1651         </permacrud>
1652         </class>
1653         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1654                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1655                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1656                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1657                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1658                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1659                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1660                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1661                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1662                 </fields>
1663                 <links>
1664                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1665                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1666         </links>
1667         </class>
1668         <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">
1669                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1670                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1671                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1672                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1673                 </fields>
1674                 <links>
1675                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1676                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1677                 </links>
1678         </class>
1679         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1680                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1681                         <field name="id" reporter:datatype="id" />
1682                         <field name="value" oils_persist:i18n="true" />
1683                 </fields>
1684                 <links/>
1685         </class>
1686         <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">
1687                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1688                         <field name="balance_owed" reporter:datatype="money" />
1689                         <field name="total_owed" reporter:datatype="money" />
1690                         <field name="total_paid" reporter:datatype="money" />
1691                         <field name="usr" reporter:datatype="link"/>
1692                 </fields>
1693                 <links>
1694                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1695         </links>
1696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1697             <actions>
1698                 <retrieve permission="VIEW_USER">
1699                     <context link="usr" field="home_ou"/>
1700                 </retrieve>
1701             </actions>
1702         </permacrud>
1703         </class>
1704         <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">
1705                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1706                         <field name="collector" />
1707                         <field name="enter_time" reporter:datatype="timestamp"/>
1708                         <field name="id" reporter:datatype="id" />
1709                         <field name="location" reporter:datatype="link"/>
1710                         <field name="usr" reporter:datatype="link"/>
1711                 </fields>
1712                 <links>
1713                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1714                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1715                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1716                 </links>
1717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1718             <actions>
1719                 <create permission="money.collections_tracker.create" context_field="location"/>
1720                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1721                 <delete permission="money.collections_tracker.create" context_field="location"/>
1722             </actions>
1723         </permacrud>
1724         </class>
1725         <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">
1726                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1727                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1728                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1729                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1730                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1731                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1732                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1733                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1734                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1735                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1736                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1737                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1738                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1739                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1740                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1741                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1742                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1743                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1744                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
1745                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1746                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1747                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1748                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1749                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1750                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1751                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1752                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1753                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1754                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1755                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1756                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
1757                 </fields>
1758                 <links>
1759                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1760                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1761                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1762                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1763                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1764                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1765                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1766                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1767                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1768                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1769                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1770                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
1771                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1772                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1773                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1774                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1775                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
1776                 </links>
1777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1778             <actions>
1779                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1780                 <retrieve/>
1781                 <update permission="UPDATE_MARC" global_required="true"/>
1782             </actions>
1783         </permacrud>
1784         </class>
1785         <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">
1786                 <fields oils_persist:primary="id">
1787                         <field name="dow_0_close" />
1788                         <field name="dow_0_open" />
1789                         <field name="dow_1_close" />
1790                         <field name="dow_1_open" />
1791                         <field name="dow_2_close" />
1792                         <field name="dow_2_open" />
1793                         <field name="dow_3_close" />
1794                         <field name="dow_3_open" />
1795                         <field name="dow_4_close" />
1796                         <field name="dow_4_open" />
1797                         <field name="dow_5_close" />
1798                         <field name="dow_5_open" />
1799                         <field name="dow_6_close" />
1800                         <field name="dow_6_open" />
1801                         <field name="id" reporter:datatype="id" />
1802                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1803                 </fields>
1804                 <links>
1805                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
1806                 </links>
1807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1808             <actions>
1809                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
1810                 <retrieve/>
1811                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
1812                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
1813             </actions>
1814         </permacrud>
1815         </class>
1816         <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">
1817                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1818                         <field name="close_end" reporter:datatype="timestamp" />
1819                         <field name="close_start" reporter:datatype="timestamp" />
1820                         <field name="id" reporter:datatype="id" />
1821                         <field name="org_unit" reporter:datatype="org_unit"/>
1822                         <field name="reason" reporter:datatype="text"/>
1823                 </fields>
1824                 <links>
1825                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1826                 </links>
1827         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1828             <actions>
1829                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1830                 <retrieve/>
1831                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1832                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1833             </actions>
1834         </permacrud>
1835         </class>
1836         <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">
1837                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1838                         <field name="extended" reporter:datatype="interval"/>
1839                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1840                         <field name="max_renewals" reporter:datatype="int" />
1841                         <field name="name" reporter:datatype="text"/>
1842                         <field name="normal" reporter:datatype="interval"/>
1843                         <field name="shrt" reporter:datatype="interval"/>
1844                 </fields>
1845                 <links>
1846                 </links>
1847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1848             <actions>
1849                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1850                 <retrieve/>
1851                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1852                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1853             </actions>
1854         </permacrud>
1855         </class>
1856         <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">
1857                 <fields oils_persist:primary="id" oils_persist:sequence="">
1858                         <field name="balance_owed" reporter:datatype="money"/>
1859                         <field name="id" reporter:datatype="id" />
1860                         <field name="last_billing_note" reporter:datatype="text"/>
1861                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1862                         <field name="last_billing_type" reporter:datatype="text"/>
1863                         <field name="last_payment_note" reporter:datatype="text"/>
1864                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1865                         <field name="last_payment_type" reporter:datatype="text"/>
1866                         <field name="total_owed" reporter:datatype="money"/>
1867                         <field name="total_paid" reporter:datatype="money"/>
1868                         <field name="usr" reporter:datatype="link"/>
1869                         <field name="xact_finish" reporter:datatype="timestamp" />
1870                         <field name="xact_start" reporter:datatype="timestamp" />
1871                         <field name="xact_type" reporter:datatype="text"/>
1872                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1873                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1874                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1875                         <field name="billing_location" reporter:datatype="link"/>
1876                 </fields>
1877                 <links>
1878                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1879                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1880                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1881                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1882                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1883                 </links>
1884         </class>
1885         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1886                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1887                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1888                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1889                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1890                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1891                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1892                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1893                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1894                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1895                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1896                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1897                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1898                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1899                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1900                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1901                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1902                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1903                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1904                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
1905                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1906                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1907                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1908                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1909                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1910                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1911                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1912                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1913                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1914                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1915                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1916                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1917                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1918                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1919                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
1920                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
1921                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
1922                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
1923                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
1924                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
1925                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
1926                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
1927                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
1928                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
1929                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
1930                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
1931                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
1932                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
1933                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
1934                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
1935                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
1936                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
1937                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
1938                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1939                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1940                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
1941                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
1942                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1943                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1944                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
1945                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1946                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
1947                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
1948                 </fields>
1949                 <links>
1950                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
1951                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
1952                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
1953                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
1954                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
1955                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
1956                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
1957                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
1958                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
1959                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
1960                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
1961                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
1962                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
1963                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
1964                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
1965                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
1966                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
1967                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
1968                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
1969                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
1970                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
1971                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
1972                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
1973                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
1974                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
1975                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
1976                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
1977                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
1978                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
1979                 </links>
1980         </class>
1981
1982         <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">
1983                 <fields oils_persist:primary="name">
1984                         <field name="name" reporter:datatype="text"/>
1985                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1986                 </fields>
1987                 <links/>
1988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1989                         <actions>
1990                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
1991                                 <retrieve/>
1992                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
1993                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
1994                         </actions>
1995                 </permacrud>
1996         </class>
1997         <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">
1998                 <fields oils_persist:primary="name">
1999                         <field name="name" reporter:datatype="text"/>
2000                         <field name="label" reporter:datatype="text"/>
2001                         <field name="description" reporter:datatype="text"/>
2002                         <field name="datatype" reporter:datatype="text"/>
2003                         <field name="fm_class" reporter:datatype="text"/>
2004                         <field name="grp" reporter:datatype="link"/>
2005                 </fields>
2006                 <links>
2007                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2008                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2009                 </links>
2010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2011                         <actions>
2012                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2013                                 <retrieve/>
2014                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2015                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2016                         </actions>
2017                 </permacrud>
2018         </class>
2019         <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">
2020                 <fields oils_persist:primary="name">
2021                         <field name="name" reporter:datatype="text"/>
2022                         <field name="label" reporter:datatype="text"/>
2023                         <field name="description" reporter:datatype="text"/>
2024                         <field name="datatype" reporter:datatype="text"/>
2025                         <field name="view_perm" reporter:datatype="link"/>
2026                         <field name="update_perm" reporter:datatype="link"/>
2027                         <field name="fm_class" reporter:datatype="text"/>
2028                         <field name="grp" reporter:datatype="link"/>
2029                 </fields>
2030                 <links>
2031                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2032                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2033                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2034                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2035                 </links>
2036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2037                         <actions>
2038                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2039                                 <retrieve/>
2040                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2041                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2042                         </actions>
2043                 </permacrud>
2044         </class>
2045         <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">
2046                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2047                         <field name="id" />
2048                         <field name="name"  reporter:datatype="text"/>
2049                         <field name="org_unit" reporter:datatype="org_unit"/>
2050                         <field name="value"  reporter:datatype="text"/>
2051                 </fields>
2052                 <links>
2053                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2054                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2055                 </links>
2056         </class>
2057         <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">
2058                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2059                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2060                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2061                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2062                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2063                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2064                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2065                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2066                 </fields>
2067                 <links>
2068                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2069                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2070                 </links>
2071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2072             <actions>
2073                 <create permission="CREATE_COPY_NOTE">
2074                     <context link="owning_copy" field="circ_lib"/>
2075                 </create>
2076                 <retrieve permission="VIEW_COPY_NOTES">
2077                     <context link="owning_copy" field="circ_lib"/>
2078                 </retrieve>
2079                 <update permission="UPDATE_COPY_NOTE">
2080                     <context link="owning_copy" field="circ_lib"/>
2081                 </update>
2082                 <delete permission="DELETE_COPY_NOTE">
2083                     <context link="owning_copy" field="circ_lib"/>
2084                 </delete>
2085             </actions>
2086         </permacrud>
2087         </class>
2088         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2089                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2090                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2091                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2092                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2093                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2094                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2095                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2096                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2097                 </fields>
2098                 <links>
2099                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2100                 </links>
2101         </class>
2102         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2103                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2104                         <field name="fingerprint"  reporter:datatype="text"/>
2105                         <field name="id" reporter:datatype="id" />
2106                         <field name="master_record" reporter:datatype="link"/>
2107                         <field name="mods"  reporter:datatype="text"/>
2108                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2109                 </fields>
2110                 <links>
2111                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2112                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2113                 </links>
2114         </class>
2115         <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">
2116                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2117                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2118                         <field name="name"  reporter:datatype="text"/>
2119                 </fields>
2120                 <links/>
2121         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2122             <actions>
2123                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2124                 <retrieve/>
2125                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2126                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2127             </actions>
2128         </permacrud>
2129         </class>
2130         <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">
2131                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2132                         <field name="code"  reporter:datatype="text"/>
2133                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2134                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2135                 </fields>
2136                 <links/>
2137         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2138             <actions>
2139                 <create permission="CREATE_PERM" global_required="true"/>
2140                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2141                 <update permission="UPDATE_PERM" global_required="true"/>
2142                 <delete permission="DELETE_PERM" global_required="true"/>
2143             </actions>
2144         </permacrud>
2145         </class>
2146         <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">
2147                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2148                         <field name="id" reporter:datatype="id" />
2149                         <field name="metarecord" reporter:datatype="link"/>
2150                         <field name="source" reporter:datatype="link"/>
2151                 </fields>
2152                 <links>
2153                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2154                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2155                 </links>
2156         </class>
2157         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" reporter:label="Combined Facet Entry View" oils_persist:readonly="true">
2158                 <oils_persist:source_definition>
2159                         SELECT * FROM (
2160                                 SELECT * FROM metabib.author_field_entry
2161                                                 UNION ALL
2162                                 SELECT * FROM metabib.keyword_field_entry
2163                                                 UNION ALL
2164                                 SELECT * FROM metabib.identifier_field_entry
2165                                                 UNION ALL
2166                                 SELECT * FROM metabib.title_field_entry
2167                                                 UNION ALL
2168                                 SELECT * FROM metabib.subject_field_entry
2169                                                 UNION ALL
2170                                 SELECT * FROM metabib.series_field_entry
2171                         )x
2172                         WHERE x.index_vector = ''
2173                 </oils_persist:source_definition>
2174                 <fields>
2175                         <field name="field" reporter:datatype="link"/>
2176                         <field name="id" reporter:datatype="id" />
2177                         <field name="source" reporter:datatype="link"/>
2178                         <field name="value"  reporter:datatype="text"/>
2179                 </fields>
2180                 <links>
2181                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2182                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2183                 </links>
2184         </class>
2185         <class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">
2186                 <oils_persist:source_definition>
2187                         SELECT * FROM metabib.author_field_entry
2188                                                 UNION ALL
2189                         SELECT * FROM metabib.keyword_field_entry
2190                                                 UNION ALL
2191                         SELECT * FROM metabib.identifier_field_entry
2192                                                 UNION ALL
2193                         SELECT * FROM metabib.title_field_entry
2194                                                 UNION ALL
2195                         SELECT * FROM metabib.subject_field_entry
2196                                                 UNION ALL
2197                         SELECT * FROM metabib.series_field_entry
2198                 </oils_persist:source_definition>
2199                 <fields>
2200                         <field name="field" reporter:datatype="link"/>
2201                         <field name="id" reporter:datatype="id" />
2202                         <field name="source" reporter:datatype="link"/>
2203                         <field name="value"  reporter:datatype="text"/>
2204                 </fields>
2205                 <links>
2206                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2207                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2208                 </links>
2209         </class>
2210         <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">
2211                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2212                         <field name="field" reporter:datatype="link"/>
2213                         <field name="id" reporter:datatype="id" />
2214                         <field name="source" reporter:datatype="link"/>
2215                         <field name="value"  reporter:datatype="text"/>
2216                 </fields>
2217                 <links>
2218                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2219                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2220                 </links>
2221         </class>
2222         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2223                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2224                         <field name="accepting_usr" reporter:datatype="link"/>
2225                         <field name="amount" reporter:datatype="money" />
2226                         <field name="amount_collected" reporter:datatype="money" />
2227                         <field name="cash_drawer" reporter:datatype="link"/>
2228                         <field name="id" reporter:datatype="id" />
2229                         <field name="note"  reporter:datatype="text"/>
2230                         <field name="payment_ts" reporter:datatype="timestamp"/>
2231                         <field name="xact" reporter:datatype="link"/>
2232                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2233                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2234                 </fields>
2235                 <links>
2236                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2237                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2238                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2239                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2240                 </links>
2241         </class>
2242         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2243                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2244                         <field name="accepting_usr" reporter:datatype="link"/>
2245                         <field name="amount" reporter:datatype="money" />
2246                         <field name="amount_collected" reporter:datatype="money" />
2247                         <field name="id" reporter:datatype="id" />
2248                         <field name="note"  reporter:datatype="text"/>
2249                         <field name="payment_ts" reporter:datatype="timestamp"/>
2250                         <field name="xact" reporter:datatype="link"/>
2251                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2252                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2253                 </fields>
2254                 <links>
2255                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2256                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2257                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2258                 </links>
2259         </class>
2260         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2261                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2262                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2263                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2264                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2265                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2266                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2267                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2268                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2269                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2270                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2271                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2272                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2273                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2274                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2275                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2276                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2277                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2278                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2279                 </fields>
2280                 <links>
2281                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2282                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2283                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2284                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2285                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2286                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2287                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2288                 </links>
2289         </class>
2290
2291         <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">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2293                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2294                         <field name="name"  reporter:datatype="text"/>
2295                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2296                         <field name="block_list" reporter:datatype="text"/>
2297                         <field name="org_depth" reporter:datatype="int"/>
2298                 </fields>
2299                 <links/>
2300         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2301             <actions>
2302                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2303                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2304                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2305                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2306             </actions>
2307         </permacrud>
2308         </class>
2309         <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">
2310                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2311                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2312                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2313                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2314                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2315                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2316                 </fields>
2317                 <links>
2318                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2319                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2320                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2321         </links>
2322         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2323             <actions>
2324                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2325                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2326                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2327                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2328             </actions>
2329         </permacrud>
2330         </class>
2331         <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">
2332                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2333                         <field name="holdable" reporter:datatype="bool"/>
2334                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2335                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2336                         <field name="opac_visible" reporter:datatype="bool"/>
2337                 </fields>
2338                 <links/>
2339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2340             <actions>
2341                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2342                 <retrieve/>
2343                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2344                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2345             </actions>
2346         </permacrud>
2347         </class>
2348         <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">
2349                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2350                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2351                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2352                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2353                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2354                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2355                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2356                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2357                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2358                 </fields>
2359                 <links>
2360                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2361                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2362                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2363                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2364                 </links>
2365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2366                         <actions>
2367                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2368                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2369                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2370                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2371                         </actions>
2372                 </permacrud>
2373         </class>
2374         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2375                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2376                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2377                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2378                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2379                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2380                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2381                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2382                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2383                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2384                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2385                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2386                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2387                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2388                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2389                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2390                 </fields>
2391                 <links>
2392                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2393                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2394                 </links>
2395         </class>
2396         <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">
2397                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2398                         <field name="call_number" />
2399                         <field name="create_date" reporter:datatype="timestamp"/>
2400                         <field name="creator" reporter:datatype="link"/>
2401                         <field name="id" reporter:datatype="id" />
2402                         <field name="pub" reporter:datatype="bool"/>
2403                         <field name="title"  reporter:datatype="text"/>
2404                         <field name="value"  reporter:datatype="text"/>
2405                 </fields>
2406                 <links>
2407                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2408                 </links>
2409         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2410             <actions>
2411                 <create permission="CREATE_VOLUME_NOTE">
2412                     <context link="call_number" field="owning_lib"/>
2413                 </create>
2414                 <retrieve permission="VIEW_VOLUME_NOTES">
2415                     <context link="call_number" field="owning_lib"/>
2416                 </retrieve>
2417                 <update permission="UPDATE_VOLUME_NOTE">
2418                     <context link="call_number" field="owning_lib"/>
2419                 </update>
2420                 <delete permission="DELETE_VOLUME_NOTE">
2421                     <context link="call_number" field="owning_lib"/>
2422                 </delete>
2423             </actions>
2424         </permacrud>
2425         </class>
2426         <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">
2427                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2428                         <field name="create_date" reporter:datatype="timestamp"/>
2429                         <field name="creator" reporter:datatype="link"/>
2430                         <field name="edit_date" reporter:datatype="timestamp"/>
2431                         <field name="editor" reporter:datatype="link"/>
2432                         <field name="id" reporter:datatype="id" />
2433                         <field name="record" reporter:datatype="link"/>
2434                         <field name="value" reporter:datatype="text"/>
2435                 </fields>
2436                 <links>
2437                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2438                 </links>
2439         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2440             <actions>
2441                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2442                 <retrieve/>
2443                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2444                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2445             </actions>
2446         </permacrud>
2447         </class>
2448         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2449                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2450                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2451                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2452                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2453                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2454                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2455                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2456                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2457                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2458                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2459                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2460                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2461                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2462                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2463                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2464                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2465                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2466                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2467                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2468                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2469                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2470                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2471                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2472                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2473                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2474                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2475                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2476                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2477                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2478                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2479                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2480                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2481                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2482                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2483                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2484                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2485                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2486                 </fields>
2487                 <links>
2488                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2489                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2490                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2491                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2492                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2493                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2494                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2495                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2496                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2497                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2498                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2499                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2500                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2501                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2502                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2503                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2504                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2505                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2506                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2507                 </links>
2508         </class>
2509         <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">
2510                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2511                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2512                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2513                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2514                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2515                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2516                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2517                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2518                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2519                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2520                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2521                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2522                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2523                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2524                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2525                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2526                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2527                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2528                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2529                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2530                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2531                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2532                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2533                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2534                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2535                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2536                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2537                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2538                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2539                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2540                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2541                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2542                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2543                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2544                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2545                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2546                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2547                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2548                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2549                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2550                 </fields>
2551                 <links>
2552                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2553                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2554                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2555                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2556                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2557                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2558                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2559                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2560                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2561                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2562                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2563                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2564                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2565                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2566                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2567                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2568                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2569                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2570                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2571                 </links>
2572         </class>
2573         <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">
2574                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2575                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2576                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2577                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2578                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2579                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2580                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2581                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2582                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2583                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2584                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2585                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2586                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2587                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2588                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2589                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2590                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2591                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2592                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2593                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2594                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2595                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2596                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2597                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2598                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2599                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2600                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2601                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2602                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2603                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2604                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2605                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2606                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2607                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2608                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2609                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2610                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2611                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2612                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2613                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2614                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2615                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2616                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2617                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2618                 </fields>
2619                 <links>
2620                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2621                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2622                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2623                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2624                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2625                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2626                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2627                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2628                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2629                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2630                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2631                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2632                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2633                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2634                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2635                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2636                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2637                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2638                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2639                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2640                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2641                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2642                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2643                 </links>
2644         </class>
2645
2646         <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">
2647                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2648                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id"/>
2649                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2650                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2651                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2652                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2653                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2654                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2655                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2656                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2657                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
2658                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2659                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2660                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
2661                 </fields>
2662                 <links>
2663                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2664                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2665                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
2666                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
2667                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
2668                 </links>
2669                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2670                         <actions>
2671                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2672                                 <retrieve />
2673                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2674                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2675                         </actions>
2676                 </permacrud>
2677         </class>
2678
2679         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
2680                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
2681                         <field reporter:label="Resource ID" name="id" reporter:datatype="id"/>
2682                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2683                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
2684                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
2685                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2686                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
2687                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
2688                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
2689                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2690                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2691                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2692                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
2693                 </fields>
2694                 <links>
2695                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2696                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
2697                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
2698                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
2699                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
2700                 </links>
2701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2702                         <actions>
2703                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2704                                 <retrieve />
2705                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2706                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2707                         </actions>
2708                 </permacrud>
2709         </class>
2710         
2711         <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">
2712                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
2713                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id"/>
2714                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2715                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
2716                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
2717                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
2718                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
2719                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2720                 </fields>
2721                 <links>
2722                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2723                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
2724                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
2725                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
2726                 </links>
2727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2728                         <actions>
2729                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2730                                 <retrieve />
2731                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2732                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2733                         </actions>
2734                 </permacrud>
2735         </class>
2736         
2737         <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">
2738                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
2739                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id"/>
2740                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2741                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
2742                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
2743                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2744                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2745                 </fields>
2746                 <links>
2747                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2748                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
2749                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
2750                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
2751                 </links>
2752                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2753                         <actions>
2754                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2755                                 <retrieve />
2756                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2757                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2758                         </actions>
2759                 </permacrud>
2760         </class>
2761         
2762         <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">
2763                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
2764                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
2765                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
2766                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
2767                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
2768                 </fields>
2769                 <links>
2770                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
2771                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
2772                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
2773                 </links>
2774                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2775                         <actions>
2776                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2777                                 <retrieve />
2778                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2779                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2780                         </actions>
2781                 </permacrud>
2782         </class>
2783         
2784         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
2785                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2786                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2787                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2788                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
2789                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
2790                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2791                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2792                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2793                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2794                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2795                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
2796                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2797                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
2798                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
2799                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
2800                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
2801                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
2802                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
2803                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
2804                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2805                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2806                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2807                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
2808                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
2809                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
2810                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
2811                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
2812                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
2813                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2814                 </fields>
2815                 <links>
2816                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2817                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2818                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2819                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2820                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2821                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2822                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
2823                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2824                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2825                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2826                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
2827                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
2828                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
2829                 </links>
2830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2831                         <actions>
2832                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2833                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
2834                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2835                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2836                         </actions>
2837                 </permacrud>
2838         </class>
2839         
2840         <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">
2841                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
2842                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
2843                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
2844                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
2845                 </fields>
2846                 <links>
2847                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
2848                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
2849                 </links>
2850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2851                         <actions>
2852                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2853                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
2854                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2855                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2856                         </actions>
2857                 </permacrud>
2858         </class>
2859
2860         <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">
2861                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2862                         <field name="bucket" reporter:datatype="link"/>
2863                         <field name="id" reporter:datatype="id" />
2864                         <field name="target_call_number" reporter:datatype="link" />
2865                         <field name="create_time" reporter:datatype="timestamp" />
2866                         <field name="pos" reporter:datatype="int" />
2867                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2868                 </fields>
2869                 <links>
2870                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2871                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2872             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2873                 </links>
2874         </class>
2875         <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">
2876                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2877                         <field name="id" reporter:datatype="id" />
2878                         <field name="item" reporter:datatype="link"/>
2879                         <field name="note" reporter:datatype="text" />
2880                 </fields>
2881                 <links>
2882                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2883                 </links>
2884         </class>
2885         <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">
2886                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2887                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2888                         <field name="btype" reporter:datatype="text"/>
2889                         <field name="id" reporter:datatype="id" />
2890                         <field name="name" reporter:datatype="text"/>
2891                         <field name="owner" reporter:datatype="link"/>
2892                         <field name="pub" reporter:datatype="bool"/>
2893                         <field name="create_time" reporter:datatype="timestamp" />
2894                 </fields>
2895                 <links>
2896                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2897                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2898                 </links>
2899         </class>
2900         <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">
2901                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2902                         <field name="id" reporter:datatype="id" />
2903                         <field name="bucket" reporter:datatype="link"/>
2904                         <field name="note" reporter:datatype="text" />
2905                 </fields>
2906                 <links>
2907                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2908                 </links>
2909         </class>
2910         <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">
2911                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2912                         <field name="hold" reporter:datatype="link"/>
2913                         <field name="id" reporter:datatype="id" />
2914                         <field name="target_copy" reporter:datatype="link"/>
2915                 </fields>
2916                 <links>
2917                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2918                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2919                 </links>
2920         </class>
2921         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2922                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2923                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2924                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2925                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2926                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2927                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2928                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2929                 </fields>
2930                 <links>
2931                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2932                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2933                 </links>
2934         </class>
2935         <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">
2936                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2937                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2938                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2939                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2940                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2941                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2942                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2943                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2944                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
2945                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2946                 </fields>
2947                 <links>
2948                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2949                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2950                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
2951                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
2952                 </links>
2953         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2954             <actions>
2955                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2956                 <retrieve/>
2957                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2958                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2959             </actions>
2960         </permacrud>
2961         </class>
2962
2963     <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">
2964         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
2965             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
2966             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
2967             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
2968             <field reporter:label="Position" name="position" reporter:datatype="int"/>
2969         </fields>
2970         <links>
2971             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
2972             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
2973         </links>
2974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2975             <actions>
2976                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2977                 <retrieve/>
2978                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2979                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2980             </actions>
2981         </permacrud>
2982     </class>
2983
2984         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2985                 <fields>
2986                         <field name="id" oils_persist:virtual="true" />
2987                         <field name="location" oils_persist:virtual="true" />
2988                         <field name="owning_lib" oils_persist:virtual="true" />
2989                         <field name="holdings" oils_persist:virtual="true" />
2990                         <field name="current_holdings" oils_persist:virtual="true" />
2991                         <field name="supplements" oils_persist:virtual="true" />
2992                         <field name="current_supplements" oils_persist:virtual="true" />
2993                         <field name="indexes" oils_persist:virtual="true" />
2994                         <field name="current_indexes" oils_persist:virtual="true" />
2995                         <field name="online" oils_persist:virtual="true" />
2996                         <field name="missing" oils_persist:virtual="true" />
2997                         <field name="incomplete" oils_persist:virtual="true" />
2998                 </fields>
2999         </class>
3000         <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">
3001                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3002                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3003                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3004                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3005                         <field reporter:label="Creator" name="creator" />
3006                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3007                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3008                         <field reporter:label="Editor" name="editor" />
3009                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3010                         <field reporter:label="Last Transaction ID" name="last_xact_id" />
3011                         <field reporter:label="MARC" name="marc" />
3012                         <field reporter:label="Source" name="source" />
3013                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3014                 </fields>
3015                 <links>
3016                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3017                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3018                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3019                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3020                 </links>
3021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3022                         <actions>
3023                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3024                                 <retrieve/>
3025                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3026                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3027                         </actions>
3028                 </permacrud>
3029         </class>
3030
3031         <class id="sercap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">
3032                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3033                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3034                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3035                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3036                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
3037                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3038                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3039                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3040                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3041                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3042                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3043                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3044                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3045                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3046                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3047                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3048                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3049                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3050                 </fields>
3051                 <links>
3052                         <link field="record" reltype="has_a" key="id" map="" class="ssub"/>
3053                 </links>
3054                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3055                 </permacrud>
3056         </class>
3057
3058         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3059                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3060                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
3061                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
3062                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3063                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3064                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3065                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3066                         <field reporter:label="Captions and Patterns" name="captions_and_patterns" oils_persist:virtual="true" reporter:datatype="link"/>
3067                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3068                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3069                 </fields>
3070                 <links>
3071                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3072                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3073                         <link field="captions_and_patterns" reltype="has_many" key="id" map="" class="sercap"/>
3074                         <link field="distributions" reltype="has_many" key="id" map="" class="sdist"/>
3075                         <link field="issuances" reltype="has_many" key="id" map="" class="siss"/>
3076                 </links>
3077         </class>
3078
3079         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3080                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3081                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3082                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3083                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3084                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="link"/>
3085                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3086                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3087                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3088                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3089                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3090                         <field reporter:label="Unit Label Base" name="unit_label_base" reporter:datatype="text"/>
3091                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3092                         <field reporter:label="Bib Summaries" name="bib_summaries" oils_persist:virtual="true" reporter:datatype="link"/>
3093                         <field reporter:label="Suplemental Summaries" name="sup_summaries" oils_persist:virtual="true" reporter:datatype="link"/>
3094                         <field reporter:label="Index Summaries" name="index_summaries" oils_persist:virtual="true" reporter:datatype="link"/>
3095                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3096                 </fields>
3097                 <links>
3098                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3099                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3100                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3101                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3102                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3103                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3104                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3105                         <link field="bib_summaries" reltype="has_many" key="id" map="" class="sbsum"/>
3106                         <link field="sup_summaries" reltype="has_many" key="id" map="" class="sssum"/>
3107                         <link field="index_summaries" reltype="has_many" key="id" map="" class="sisum"/>
3108                         <link field="streams" reltype="has_many" key="id" map="" class="sstr"/>
3109                 </links>
3110                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3111                 </permacrud>
3112         </class>
3113
3114         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3115                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3116                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3117                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3118                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3119                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3120                 </fields>
3121                 <links>
3122                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3123                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3124                 </links>
3125                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3126                 </permacrud>
3127         </class>
3128
3129         <class id="srlu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::routing_list_user" oils_persist:tablename="serial.routing_list_user" reporter:label="Routing List User">
3130                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3131                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3132                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3133                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3134                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3135                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3136                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3137                 </fields>
3138                 <links>
3139                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3140                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3141                 </links>
3142                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3143                 </permacrud>
3144         </class>
3145
3146         <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3147                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3148                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3149                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3150                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3151                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3152                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3153                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3154                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3155                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3156                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3157                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3158                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3159                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3160                 </fields>
3161                 <links>
3162                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3163                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3164                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3165                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3166                 </links>
3167         </class>
3168
3169         <class id="sunit" controller="open-ils.cstore" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3170                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3171                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3172             <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3173             <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3174             <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3175             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3176             <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3177             <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3178             <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3179             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3180             <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3181             <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3182             <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3183             <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3184             <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3185             <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3186             <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3187             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3188             <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3189             <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3190             <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3191             <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3192             <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3193             <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3194             <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3195             <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3196             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3197             <field reporter:label="Price" name="price" reporter:datatype="money" />
3198             <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3199             <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3200             <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3201             <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3202             <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3203             <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3204             <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3205             <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3206             <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3207             <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3208                         <field reporter:label="Label Sort Key" name="label_sort_key" reporter:datatype="text"/>
3209                         <field reporter:label="Contents" name="contents" reporter:datatype="text"/>
3210                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3211                         <field reporter:label="Serial Items" name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3212                 </fields>
3213                 <links>
3214             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3215             <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3216             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3217             <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3218             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3219             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3220             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3221             <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3222             <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3223             <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3224             <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3225             <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3226             <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3227             <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3228             <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3229                 </links>
3230                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3231                 </permacrud>
3232         </class>
3233
3234         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3235                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3236                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3237                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3238                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3239                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3240                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3241                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3242                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3243                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3244                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3245                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3246                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3247                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3248                 </fields>
3249                 <links>
3250                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3251                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3252                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3253                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3254                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
3255                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3256                         <link field="notes" reltype="has_many" key="id" map="" class="sin"/>
3257                 </links>
3258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3259                 </permacrud>
3260         </class>
3261
3262         <class id="sin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
3263                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
3264                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3265                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
3266                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3267                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3268                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3269                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3270                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3271                 </fields>
3272                 <links>
3273                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
3274                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3275                 </links>
3276                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3277                 </permacrud>
3278         </class>
3279
3280         <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
3281                 <fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
3282                         <field name="id" reporter:datatype="id" />
3283                         <field name="distribution" reporter:datatype="link"/>
3284                         <field name="generated_coverage" reporter:datatype="text"/>
3285                         <field name="textual_holdings" reporter:datatype="text"/>
3286                 </fields>
3287                 <links>
3288                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3289                 </links>
3290         </class>
3291
3292         <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
3293                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
3294                         <field name="id" reporter:datatype="id" />
3295                         <field name="distribution" reporter:datatype="link"/>
3296                         <field name="generated_coverage" reporter:datatype="text"/>
3297                         <field name="textual_holdings" reporter:datatype="text"/>
3298                 </fields>
3299                 <links>
3300                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3301                 </links>
3302         </class>
3303
3304         <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
3305                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
3306                         <field name="id" reporter:datatype="id" />
3307                         <field name="distribution" reporter:datatype="link"/>
3308                         <field name="generated_coverage" reporter:datatype="text"/>
3309                         <field name="textual_holdings" reporter:datatype="text"/>
3310                 </fields>
3311                 <links>
3312                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3313                 </links>
3314         </class>
3315
3316         <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">
3317                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
3318                         <field name="id" reporter:datatype="id" />
3319                         <field name="owning_copy" reporter:datatype="link"/>
3320                         <field name="stat_cat" reporter:datatype="link"/>
3321                         <field name="stat_cat_entry" reporter:datatype="link"/>
3322                 </fields>
3323                 <links>
3324                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3325                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
3326                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
3327                 </links>
3328         </class>
3329         <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">
3330                 <fields oils_persist:primary="code">
3331                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3332                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3333                 </fields>
3334                 <links/>
3335         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3336             <actions>
3337                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3338                 <retrieve/>
3339                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3340                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3341             </actions>
3342         </permacrud>
3343         </class>
3344         <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">
3345                 <fields oils_persist:primary="code">
3346                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
3347                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3348                 </fields>
3349                 <links/>
3350         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3351             <actions>
3352                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3353                 <retrieve/>
3354                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3355                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3356             </actions>
3357         </permacrud>
3358         </class>
3359         <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">
3360                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
3361                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
3362                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
3363                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
3364                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
3365                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
3366                 </fields>
3367                 <links>
3368             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3369         </links>
3370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3371             <actions>
3372                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3373                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3374                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3375                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3376             </actions>
3377         </permacrud>
3378         </class>
3379         <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">
3380                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
3381                         <field name="id" reporter:datatype="id" />
3382                         <field name="name" reporter:datatype="text"/>
3383                 </fields>
3384                 <links/>
3385         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3386             <actions>
3387                 <create permission="CREATE_LASSO" global_required="true"/>
3388                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
3389                 <update permission="UPDATE_LASSO" global_required="true"/>
3390                 <delete permission="DELETE_LASSO" global_required="true"/>
3391             </actions>
3392         </permacrud>
3393         </class>
3394         <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">
3395                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
3396                         <field name="id" reporter:datatype="id" />
3397                         <field name="lasso" reporter:datatype="link"/>
3398                         <field name="org_unit" reporter:datatype="org_unit"/>
3399                 </fields>
3400                 <links>
3401                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
3402                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3403                 </links>
3404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3405             <actions>
3406                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
3407                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
3408                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
3409                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
3410             </actions>
3411         </permacrud>
3412         </class>
3413         <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">
3414                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3415                         <field name="id" reporter:datatype="id" />
3416                         <field name="from_org" reporter:datatype="org_unit"/>
3417                         <field name="to_org" reporter:datatype="org_unit"/>
3418                         <field name="prox" reporter:datatype="int" />
3419                 </fields>
3420                 <links>
3421                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
3422                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
3423                 </links>
3424         </class>
3425         <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">
3426                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3427                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3428                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
3429                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
3430                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
3431                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
3432                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
3433                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
3434                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
3435                 </fields>
3436                 <links/>
3437         </class>
3438         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
3439                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
3440                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
3441                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3442                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
3443                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
3444                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
3445                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3446                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
3447                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3448                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
3449                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
3450                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
3451                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
3452                 </fields>
3453                 <links>
3454                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3455                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
3456                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
3457                 </links>
3458         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3459             <actions>
3460                 <create permission="ADMIN_SURVEY" context_field="owner"/>
3461                 <retrieve/>
3462                 <update permission="ADMIN_SURVEY" context_field="owner"/>
3463                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
3464             </actions>
3465         </permacrud>
3466         </class>
3467         <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">
3468                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
3469                         <field name="address_type"  reporter:datatype="text"/>
3470                         <field name="city"  reporter:datatype="text"/>
3471                         <field name="country"  reporter:datatype="text"/>
3472                         <field name="county"  reporter:datatype="text"/>
3473                         <field name="id" reporter:datatype="id" />
3474                         <field name="org_unit" reporter:datatype="org_unit"/>
3475                         <field name="post_code"  reporter:datatype="text"/>
3476                         <field name="state"  reporter:datatype="text"/>
3477                         <field name="street1"  reporter:datatype="text"/>
3478                         <field name="street2"  reporter:datatype="text"/>
3479                         <field name="valid" reporter:datatype="bool"/>
3480                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
3481                 </fields>
3482                 <links>
3483                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3484                 </links>
3485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3486             <actions>
3487                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
3488                 <retrieve/>
3489                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
3490                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
3491             </actions>
3492         </permacrud>
3493         </class>
3494         <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">
3495                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
3496                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
3497                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
3498                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
3499                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
3500                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3501                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
3502                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
3503                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
3504                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
3505                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
3506                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
3507                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
3508                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
3509                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
3510                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
3511                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
3512                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
3513                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
3514                         <field reporter:label="Item Selection Depth" name="selection_depth" />
3515                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
3516                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
3517                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
3518                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
3519                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
3520                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
3521                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
3522                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
3523                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
3524                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
3525                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
3526                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
3527                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
3528                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
3529                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
3530                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
3531                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
3532                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
3533                 </fields>
3534                 <links>
3535                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
3536                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
3537                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
3538                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
3539                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
3540                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3541                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3542                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3543                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
3544                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
3545                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
3546                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
3547                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
3548                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
3549                 </links>
3550         </class>
3551         <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">
3552                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
3553                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3554                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
3555                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3556                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
3557                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
3558                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
3559                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
3560                 </fields>
3561                 <links>
3562                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3563                 </links>
3564                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3565                         <actions>
3566                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
3567                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
3568                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
3569                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
3570                         </actions>
3571                 </permacrud>
3572         </class>
3573         <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">
3574                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
3575                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3576                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
3577                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
3578                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
3579                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
3580                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3581                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3582                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
3583                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
3584                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
3585                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
3586                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
3587                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3588                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
3589                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
3590                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
3591                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3592                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3593                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3594                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3595                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
3596                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3597                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
3598                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
3599                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3600                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
3601                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3602                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3603                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3604                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
3605                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
3606                 </fields>
3607                 <links>
3608                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
3609                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
3610                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
3611                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
3612                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
3613                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
3614                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
3615                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
3616                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
3617                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
3618                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
3619                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
3620                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
3621                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
3622                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
3623                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
3624                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
3625                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
3626                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
3627                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
3628                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
3629                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
3630                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
3631                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
3632                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
3633                 </links>
3634         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3635             <actions>
3636                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
3637                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
3638                     <context field="id"/>
3639                     <context field="parent_ou"/>
3640                                 </retrieve>
3641                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
3642                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
3643             </actions>
3644         </permacrud>
3645         </class>
3646         <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">
3647                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
3648                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3649                         <field name="btype" reporter:datatype="text"/>
3650                         <field name="id" reporter:datatype="id" />
3651                         <field name="name"  reporter:datatype="text"/>
3652                         <field name="owner" reporter:datatype="link"/>
3653                         <field name="pub" reporter:datatype="bool"/>
3654                         <field name="create_time" reporter:datatype="timestamp" />
3655                 </fields>
3656                 <links>
3657                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3658                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
3659                 </links>
3660         </class>
3661         <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">
3662                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
3663                         <field name="id" reporter:datatype="id" />
3664                         <field name="bucket" reporter:datatype="link"/>
3665                         <field name="note" reporter:datatype="text" />
3666                 </fields>
3667                 <links>
3668                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3669                 </links>
3670         </class>
3671         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
3672                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
3673                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3674                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3675                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3676                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3677                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3678                 </fields>
3679                 <links>
3680                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3681                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
3682                 </links>
3683         </class>
3684         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
3685                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
3686                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
3687                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3688                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
3689                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3690                 </fields>
3691                 <links>
3692                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3693                 </links>
3694         </class>
3695         <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">
3696                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
3697                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3698                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3699                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3700                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3701                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3702                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
3703                 </fields>
3704                 <links>
3705                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3706                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
3707                 </links>
3708         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3709             <actions>
3710                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
3711                 <retrieve />
3712                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
3713                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
3714             </actions>
3715         </permacrud>
3716         </class>
3717         <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">
3718                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
3719                         <field name="field" reporter:datatype="link"/>
3720                         <field name="id" reporter:datatype="id" />
3721                         <field name="source" reporter:datatype="link"/>
3722                         <field name="value"  reporter:datatype="text"/>
3723                 </fields>
3724                 <links>
3725                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3726                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3727                 </links>
3728         </class>
3729         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
3730                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
3731                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3732                         <field name="btype" reporter:datatype="text"/>
3733                         <field name="id" reporter:datatype="id" />
3734                         <field name="name"  reporter:datatype="text"/>
3735                         <field name="owner" reporter:datatype="link"/>
3736                         <field name="pub" reporter:datatype="bool"/>
3737                         <field name="create_time" reporter:datatype="timestamp" />
3738                 </fields>
3739                 <links>
3740                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3741                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
3742                 </links>
3743         </class>
3744         <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">
3745                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
3746                         <field name="id" reporter:datatype="id" />
3747                         <field name="bucket" reporter:datatype="link"/>
3748                         <field name="note" reporter:datatype="text" />
3749                 </fields>
3750                 <links>
3751                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3752                 </links>
3753         </class>
3754         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
3755                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3756                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3757                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3758                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3759                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
3760                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
3761                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3762                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3763                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3764                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3765                 </fields>
3766                 <links>
3767                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3768                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3769                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3770                 </links>
3771         </class>
3772         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
3773                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
3774                         <field name="id" reporter:datatype="id" />
3775                         <field name="ind1" />
3776                         <field name="ind2" />
3777                         <field name="record" />
3778                         <field name="subfield" />
3779                         <field name="tag" />
3780                         <field name="value" />
3781                 </fields>
3782                 <links>
3783                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3784                 </links>
3785         </class>
3786         <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">
3787                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
3788                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
3789                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3790                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
3791                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3792                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3793                 </fields>
3794                 <links>
3795                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3796                 </links>
3797         </class>
3798         <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">
3799                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
3800                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3801                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
3802                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
3803                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
3804                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3805                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3806                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
3807                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
3808                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
3809                 </fields>
3810                 <links>
3811                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
3812                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
3813                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
3814                 </links>
3815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3816             <actions>
3817                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
3818                 <retrieve/>
3819                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
3820                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
3821             </actions>
3822         </permacrud>
3823         </class>
3824         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
3825                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
3826                         <field name="create_date" reporter:datatype="timestamp"/>
3827                         <field name="creator" reporter:datatype="link"/>
3828                         <field name="edit_date" reporter:datatype="timestamp"/>
3829                         <field name="editor" reporter:datatype="link"/>
3830                         <field name="id" reporter:datatype="id" />
3831                         <field name="pub" reporter:datatype="bool"/>
3832                         <field name="record" reporter:datatype="link"/>
3833                         <field name="value"  reporter:datatype="text"/>
3834                 </fields>
3835                 <links>
3836                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3837                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3838                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3839                 </links>
3840         </class>
3841         <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">
3842                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3843                         <field name="balance_owed" reporter:datatype="money" />
3844                         <field name="total_owed" reporter:datatype="money" />
3845                         <field name="total_paid" reporter:datatype="money" />
3846                         <field name="usr" reporter:datatype="link"/>
3847                 </fields>
3848                 <links>
3849                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3850                 </links>
3851         </class>
3852         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
3853                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3854                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
3855                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3856                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
3857                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3858                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
3859                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
3860                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3861                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3862                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3863                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3864                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3865                 </fields>
3866                 <links>
3867                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3868                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3869                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3870                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3871                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3872                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3873                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3874                 </links>
3875         </class>
3876         <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">
3877                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
3878                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
3879                         <field name="quality" reporter:datatype="int" />
3880                         <field name="source" reporter:datatype="text"/>
3881                         <field name="transcendant" reporter:datatype="bool"/>
3882                 </fields>
3883                 <links/>
3884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3885             <actions>
3886                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
3887                 <retrieve/>
3888                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
3889                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
3890             </actions>
3891         </permacrud>
3892         </class>
3893         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
3894                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3895                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3896                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3897                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3898                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3899                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3900                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3901                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3902                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3903                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3904                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3905                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3906                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3907                 </fields>
3908                 <links>
3909                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3910                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3911                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3912                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3913                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3914                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3915                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3916                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3917                 </links>
3918         </class>
3919         <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">
3920                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
3921                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3922                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3923                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3924                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
3925                 </fields>
3926                 <links>
3927                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3928                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3929                 </links>
3930         </class>
3931         <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">
3932                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
3933                         <field name="bucket" reporter:datatype="link"/>
3934                         <field name="id" reporter:datatype="id" />
3935                         <field name="target_user" reporter:datatype="link"/>
3936                         <field name="create_time" reporter:datatype="timestamp" />
3937                         <field name="pos" reporter:datatype="int" />
3938                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3939                 </fields>
3940                 <links>
3941                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
3942                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3943             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
3944                 </links>
3945         </class>
3946         <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">
3947                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
3948                         <field name="id" reporter:datatype="id" />
3949                         <field name="item" reporter:datatype="link"/>
3950                         <field name="note" reporter:datatype="text" />
3951                 </fields>
3952                 <links>
3953                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
3954                 </links>
3955         </class>
3956         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
3957                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3958                         <field name="balance_owed" reporter:datatype="money" />
3959                         <field name="total_owed" reporter:datatype="money" />
3960                         <field name="total_paid" reporter:datatype="money" />
3961                         <field name="usr" reporter:datatype="link"/>
3962                 </fields>
3963                 <links>
3964                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3965                 </links>
3966         </class>
3967         <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">
3968                 <fields oils_persist:primary="code" oils_persist:sequence="">
3969                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
3970                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3971                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3972                 </fields>
3973                 <links/>
3974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3975             <actions>
3976                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3977                 <retrieve/>
3978                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3979                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3980             </actions>
3981         </permacrud>
3982         </class>
3983         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
3984                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3985                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3986                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3987                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3988                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3989                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3990                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3991                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3992                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3993                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3994                 </fields>
3995                 <links>
3996                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3997                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3998                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3999                 </links>
4000         </class>
4001         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4002                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4003                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4004                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4005                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4006                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4007                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4008                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4009                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4010                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4011                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4012                 </fields>
4013                 <links>
4014                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4015                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4016                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4017                 </links>
4018         </class>
4019         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4020                 <fields oils_persist:primary="id" oils_persist:sequence="">
4021                         <field name="checkin_lib" reporter:datatype="link"/>
4022                         <field name="checkin_staff" reporter:datatype="link"/>
4023                         <field name="checkin_time" reporter:datatype="timestamp"/>
4024                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4025                         <field name="circ_staff" reporter:datatype="link"/>
4026                         <field name="desk_renewal" reporter:datatype="bool"/>
4027                         <field name="due_date" reporter:datatype="timestamp"/>
4028                         <field name="duration" reporter:datatype="interval"/>
4029                         <field name="duration_rule" reporter:datatype="link"/>
4030                         <field name="fine_interval" reporter:datatype="interval"/>
4031                         <field name="id" reporter:datatype="id" />
4032                         <field name="max_fine" reporter:datatype="money" />
4033                         <field name="max_fine_rule" reporter:datatype="link"/>
4034                         <field name="opac_renewal" reporter:datatype="bool"/>
4035                         <field name="phone_renewal" reporter:datatype="bool"/>
4036                         <field name="recurring_fine" reporter:datatype="money" />
4037                         <field name="recurring_fine_rule" reporter:datatype="link"/>
4038                         <field name="renewal_remaining" reporter:datatype="int" />
4039                         <field name="stop_fines" reporter:datatype="text"/>
4040                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
4041                         <field name="target_copy" reporter:datatype="link"/>
4042                         <field name="usr" reporter:datatype="link"/>
4043                         <field name="xact_finish" reporter:datatype="timestamp" />
4044                         <field name="xact_start" reporter:datatype="timestamp" />
4045                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4046                 </fields>
4047                 <links>
4048                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4049                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4050                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4051                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4052                 </links>
4053         </class>
4054         <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">
4055                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
4056                         <field name="field" reporter:datatype="link"/>
4057                         <field name="id" reporter:datatype="id" />
4058                         <field name="source" reporter:datatype="link"/>
4059                         <field name="value" reporter:datatype="text"/>
4060                 </fields>
4061                 <links>
4062                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4063                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4064                 </links>
4065         </class>
4066         <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">
4067                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
4068                         <field name="high" reporter:datatype="money" />
4069                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4070                         <field name="low" reporter:datatype="money" />
4071                         <field name="name" reporter:datatype="text"/>
4072                         <field name="normal" reporter:datatype="money" />
4073                         <field name="recurrence_interval" reporter:datatype="interval"/>
4074                 </fields>
4075                 <links/>
4076         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4077             <actions>
4078                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4079                 <retrieve/>
4080                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4081                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4082             </actions>
4083         </permacrud>
4084         </class>
4085         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4086                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4087                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4088                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4089                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4090                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4091                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4092                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4093                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4094                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4095                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4096                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4097                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4098                 </fields>
4099                 <links>
4100                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4101                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4102                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4103                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4104                 </links>
4105         </class>
4106         <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">
4107                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4108                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4109                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4110                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4111                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4112                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4113                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4114                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4115                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4116                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4117                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4118                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4119                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4120                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4121                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4122                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4123                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4124                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4125                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4126                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4127                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4128                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4129                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4130                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4131                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4132                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4133                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4134                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4135                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4136                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4137                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4138                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4139                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4140                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4141                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4142                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4143                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4144                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4145                 </fields>
4146                 <links>
4147                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4148                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4149                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4150                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4151                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4152                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4153                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4154                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4155                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4156                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4157                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4158                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4159                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4160                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4161                 </links>
4162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4163             <actions>
4164                 <create permission="CREATE_COPY">
4165                     <context link="call_number" field="owning_lib"/>
4166                 </create>
4167                 <retrieve/>
4168                 <update permission="UPDATE_COPY">
4169                     <context link="call_number" field="owning_lib"/>
4170                 </update>
4171                 <delete permission="DELETE_COPY">
4172                     <context link="call_number" field="owning_lib"/>
4173                 </delete>
4174             </actions>
4175         </permacrud>
4176         </class>
4177
4178         <class id="act" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_template" oils_persist:tablename="asset.copy_template" reporter:label="Asset Copy Template">
4179                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
4180                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4181                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
4182                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4183                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4184                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4185                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4186                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4187                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
4188                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
4189                         <field reporter:label="Location" name="location" reporter:datatype="int"/>
4190                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4191                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4192                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
4193                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
4194                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
4195                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
4196                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
4197                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4198                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
4199                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
4200                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
4201                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4202                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4203                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
4204                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
4205                 </fields>
4206                 <links>
4207                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4208                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4209                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4210                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4211                 </links>
4212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4213                 </permacrud>
4214         </class>
4215
4216         <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">
4217                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
4218                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
4219                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4220                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4221                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
4222                 </fields>
4223                 <links/>
4224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4225             <actions>
4226                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4227                 <retrieve/>
4228                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4229                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4230             </actions>
4231         </permacrud>
4232         </class>
4233         <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">
4234                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
4235                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
4236                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4237                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4238                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
4239                 </fields>
4240                 <links/>
4241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4242             <actions>
4243                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4244                 <retrieve/>
4245                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4246                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4247             </actions>
4248         </permacrud>
4249         </class>
4250         <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">
4251                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
4252                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4253                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4254                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4255                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4256                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
4257                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
4258                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
4259                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
4260                 </fields>
4261                 <links>
4262                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
4263                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
4264                 </links>
4265         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4266             <actions>
4267                 <create permission="CREATE_PERM" global_required="true"/>
4268                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4269                 <update permission="UPDATE_PERM" global_required="true"/>
4270                 <delete permission="DELETE_PERM" global_required="true"/>
4271             </actions>
4272         </permacrud>
4273         </class>
4274         <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">
4275                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
4276                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4277                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
4278                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
4279                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
4280                 </fields>
4281                 <links>
4282                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
4283                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
4284                 </links>
4285         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4286             <actions>
4287                 <create permission="ADMIN_SURVEY">
4288                     <context link="question" jump="survey" field="owner"/>
4289                 </create>
4290                 <retrieve/>
4291                 <update permission="ADMIN_SURVEY">
4292                     <context link="question" jump="survey" field="owner"/>
4293                 </update>
4294                 <delete permission="ADMIN_SURVEY">
4295                     <context link="question" jump="survey" field="owner"/>
4296                 </delete>
4297             </actions>
4298         </permacrud>
4299         </class>
4300         <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">
4301                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
4302                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4303                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
4304                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
4305                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
4306                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
4307                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
4308                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
4309                 </fields>
4310                 <links>
4311                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
4312                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4313                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
4314                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4315                 </links>
4316         </class>
4317         <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">
4318                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4319                         <field name="balance_owed" reporter:datatype="money" />
4320                         <field name="total_owed" reporter:datatype="money" />
4321                         <field name="total_paid" reporter:datatype="money" />
4322                         <field name="usr" reporter:datatype="link"/>
4323                 </fields>
4324                 <links>
4325                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4326                 </links>
4327         </class>
4328         <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">
4329                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
4330                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
4331                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
4332                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
4333                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4334                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4335                 </fields>
4336                 <links>
4337                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4338                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4339                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4340                 </links>
4341         </class>
4342         <class id="mife" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::identifier_field_entry" oils_persist:tablename="metabib.identifier_field_entry" reporter:label="Identifier Field Entry">
4343                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
4344                         <field name="field" reporter:datatype="link"/>
4345                         <field name="id" reporter:datatype="id" />
4346                         <field name="source" reporter:datatype="link"/>
4347                         <field name="value" reporter:datatype="text"/>
4348                 </fields>
4349                 <links>
4350                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4351                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4352                 </links>
4353         </class>
4354         <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">
4355                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
4356                         <field name="field" reporter:datatype="link"/>
4357                         <field name="id" reporter:datatype="id" />
4358                         <field name="source" reporter:datatype="link"/>
4359                         <field name="value" reporter:datatype="text"/>
4360                 </fields>
4361                 <links>
4362                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4363                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4364                 </links>
4365         </class>
4366         <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">
4367                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
4368                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4369                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
4370                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
4371                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
4372                 </fields>
4373                 <links>
4374                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
4375                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4376                 </links>
4377         </class>
4378         <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">
4379                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
4380                         <field name="depth" reporter:datatype="int" />
4381                         <field name="grantable" reporter:datatype="bool"/>
4382                         <field name="grp" reporter:datatype="link"/>
4383                         <field name="id" reporter:datatype="id" />
4384                         <field name="perm" reporter:datatype="link"/>
4385                 </fields>
4386                 <links>
4387                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4388                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4389                 </links>
4390         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4391             <actions>
4392                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
4393                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
4394                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
4395                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
4396             </actions>
4397         </permacrud>
4398         </class>
4399         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
4400                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
4401                         <field name="items" oils_persist:virtual="true" />
4402                         <field name="btype" reporter:datatype="text"/>
4403                         <field name="id" reporter:datatype="id" />
4404                         <field name="name" reporter:datatype="text"/>
4405                         <field name="owner" reporter:datatype="link"/>
4406                         <field name="pub" reporter:datatype="bool"/>
4407                         <field name="create_time" reporter:datatype="timestamp" />
4408                 </fields>
4409                 <links>
4410                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4411                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
4412                 </links>
4413         </class>
4414         <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">
4415                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
4416                         <field name="id" reporter:datatype="id" />
4417                         <field name="bucket" reporter:datatype="link"/>
4418                         <field name="note" reporter:datatype="text" />
4419                 </fields>
4420                 <links>
4421                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
4422                 </links>
4423         </class>
4424         <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">
4425                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
4426                         <field name="id" reporter:datatype="int" />
4427                         <field name="usr" reporter:datatype="link"/>
4428                         <field name="work_ou" reporter:datatype="link"/>
4429                 </fields>
4430                 <links>
4431                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4432                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
4433                 </links>
4434         </class>
4435         <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">
4436                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
4437                         <field name="depth" reporter:datatype="int"/>
4438                         <field name="grantable" reporter:datatype="bool"/>
4439                         <field name="id" reporter:datatype="id" />
4440                         <field name="perm" reporter:datatype="link"/>
4441                         <field name="usr" reporter:datatype="link"/>
4442                 </fields>
4443                 <links>
4444                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4445                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4446                 </links>
4447         </class>
4448         <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">
4449                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
4450                         <field name="object_id" reporter:datatype="text"/>
4451                         <field name="grantable" reporter:datatype="bool"/>
4452                         <field name="id" reporter:datatype="id" />
4453                         <field name="perm" reporter:datatype="link"/>
4454                         <field name="usr" reporter:datatype="link"/>
4455                         <field name="object_type" reporter:datatype="text"/>
4456                 </fields>
4457                 <links>
4458                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4459                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4460                 </links>
4461         </class>
4462         <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">
4463                 <fields oils_persist:primary="id" oils_persist:sequence="">
4464                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4465                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4466                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4467                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4468                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4469                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4470                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4471                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4472                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4473                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4474                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4475                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4476                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4477                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4478                 </fields>
4479                 <links>
4480                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4481                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4482                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4483                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4484                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4485                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4486                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4487                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4488                 </links>
4489         </class>
4490         <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">
4491                 <fields oils_persist:primary="id" oils_persist:sequence="">
4492                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4493                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4494                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4495                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4496                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4497                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4498                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4499                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4500                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4501                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4502                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4503                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4504                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4505                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4506                 </fields>
4507                 <links>
4508                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4509                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4510                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4511                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4512                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4513                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4514                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4515                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4516                 </links>
4517         </class>
4518         <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">
4519                 <fields oils_persist:primary="id" oils_persist:sequence="">
4520                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4521                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4522                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4523                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4524                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4525                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4526                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4527                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4528                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4529                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4530                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4531                 </fields>
4532                 <links>
4533                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4534                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4535                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4536                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4537                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4538                 </links>
4539         </class>
4540         <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">
4541                 <fields oils_persist:primary="id" oils_persist:sequence="">
4542                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4543                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4544                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4545                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4546                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4547                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4548                         <field reporter:label="Accepting User" name="accepting_usr" />
4549                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
4550                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4551                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4552                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4553                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4554                 </fields>
4555                 <links>
4556                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4557                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4558                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4559                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4560                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4561                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4562                 </links>
4563         </class>
4564         <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">
4565                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
4566                         <field name="bucket" reporter:datatype="link"/>
4567                         <field name="id" reporter:datatype="id" />
4568                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
4569                         <field name="create_time" reporter:datatype="timestamp" />
4570                         <field name="pos" reporter:datatype="int" />
4571                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4572                 </fields>
4573                 <links>
4574                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
4575                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4576             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
4577                 </links>
4578         </class>
4579         <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">
4580                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
4581                         <field name="id" reporter:datatype="id" />
4582                         <field name="item" reporter:datatype="link"/>
4583                         <field name="note" reporter:datatype="text" />
4584                 </fields>
4585                 <links>
4586                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
4587                 </links>
4588         </class>
4589         <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">
4590                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
4591                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
4592                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4593                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4594                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4595                 </fields>
4596                 <links>
4597                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4598                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4599                 </links>
4600         </class>
4601
4602         <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">
4603                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
4604                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
4605                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4606                 </fields>
4607                 <links/>
4608         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4609             <actions>
4610                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4611                 <retrieve/>
4612                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4613                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4614             </actions>
4615         </permacrud>
4616         </class>
4617
4618
4619         <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">
4620                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4621                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4622                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4623                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4624                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
4625                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4626                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4627                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4628                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4629                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4630                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4631                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4632                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4633                 </fields>
4634                 <links>
4635                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4636                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
4637                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4638                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4639                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4640                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4641                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4642                 </links>
4643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4644             <actions>
4645                 <create permission="TRANSIT_COPY">
4646                     <context link="target_copy" field="owner"/>
4647                 </create>
4648                 <retrieve/>
4649                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4650                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4651             </actions>
4652         </permacrud>
4653         </class>
4654         <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">
4655                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4656                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4657                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4658                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4659                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
4660                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4661                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4662                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4663                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4664                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4665                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4666                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4667                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4668                 </fields>
4669                 <links>
4670                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4671                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4672                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4673                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4674                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4675                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4676                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4677                 </links>
4678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4679             <actions>
4680                 <create permission="TRANSIT_COPY" context_field="owner">
4681                     <context link="target_copy" field="circ_lib"/>
4682                 </create>
4683                 <retrieve/>
4684                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4685                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4686             </actions>
4687         </permacrud>
4688         </class>
4689         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
4690                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
4691                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4692                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
4693                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
4694                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
4695                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4696                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
4697                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4698                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
4699                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4700                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
4701                 </fields>
4702                 <links>
4703                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4704                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
4705                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
4706                 </links>
4707         </class>
4708         <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">
4709                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
4710                         <field name="grp" />
4711                         <field name="id" reporter:datatype="id" />
4712                         <field name="usr" />
4713                 </fields>
4714                 <links>
4715                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4716                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4717                 </links>
4718         </class>
4719         <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">
4720                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
4721                         <field name="id" reporter:datatype="id" />
4722                         <field name="fq_field" reporter:datatype="text"/>
4723                         <field name="identity_value" reporter:datatype="text"/>
4724                         <field name="translation" reporter:datatype="text"/>
4725                         <field name="string" reporter:datatype="text"/>
4726                 </fields>
4727                 <links>
4728                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
4729                 </links>
4730         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4731             <actions>
4732                 <create permission="CREATE_TRANSLATION" global_required="true"/>
4733                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
4734                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
4735                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
4736             </actions>
4737         </permacrud>
4738         </class>
4739         <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">
4740                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
4741                         <field name="id" reporter:datatype="id" />
4742                         <field name="fm_class" reporter:datatype="text"/>
4743                         <field name="field" reporter:datatype="text"/>
4744                         <field name="owner" reporter:datatype="org_unit"/>
4745                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
4746                 </fields>
4747                 <links>
4748                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4749                 </links>
4750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4751             <actions>
4752                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4753                 <retrieve/>
4754                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4755                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4756             </actions>
4757         </permacrud>
4758         </class>
4759         <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">
4760                 <fields oils_persist:primary="code">
4761                         <field name="code" reporter:datatype="id" />
4762                         <field name="marc_code" reporter:datatype="text"/>
4763                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4764                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4765                 </fields>
4766                 <links/>
4767         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4768             <actions>
4769                 <create permission="CREATE_LOCALE" global_required="true"/>
4770                 <retrieve/>
4771                 <update permission="UPDATE_LOCALE" global_required="true"/>
4772                 <delete permission="DELETE_LOCALE" global_required="true"/>
4773             </actions>
4774         </permacrud>
4775         </class>
4776         <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">
4777                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
4778                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4779                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
4780                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
4781             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
4782                 </fields>
4783                 <links>
4784                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4785                 </links>
4786         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4787             <actions>
4788                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
4789                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
4790                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
4791                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
4792             </actions>
4793         </permacrud>
4794         </class>
4795
4796         <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">
4797                 <fields oils_persist:primary="id">
4798                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4799                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4800                 </fields>
4801                 <links/>
4802         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4803             <actions>
4804                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4805                 <retrieve/>
4806                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4807                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4808             </actions>
4809         </permacrud>
4810         </class>
4811
4812         <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">
4813                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
4814                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4815                         <field reporter:label="User" name="usr" reporter:datatype="link" />
4816                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
4817                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
4818                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
4819                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
4820                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
4821                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
4822                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
4823                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
4824                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
4825                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
4826                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
4827                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
4828                         <field reporter:label="Title" name="title" reporter:datatype="text" />
4829                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
4830                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4831                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
4832                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
4833                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
4834                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
4835                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
4836                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
4837                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
4838                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
4839                 </fields>
4840                 <links>
4841                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4842                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4843                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4844                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
4845                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
4846                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
4847                 </links>
4848         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4849             <actions>
4850                 <create permission="user_request.create">
4851                     <context link="usr" field="home_ou"/>
4852                                 </create>
4853                 <retrieve permission="user_request.view">
4854                     <context link="usr" field="home_ou"/>
4855                                 </retrieve>
4856                 <update permission="user_request.update">
4857                     <context link="usr" field="home_ou"/>
4858                                 </update>
4859                 <delete permission="user_request.delete">
4860                     <context link="usr" field="home_ou"/>
4861                                 </delete>
4862             </actions>
4863         </permacrud>
4864         </class>
4865
4866         <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">
4867                 <fields oils_persist:primary="code">
4868                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
4869                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4870                 </fields>
4871                 <links/>
4872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4873             <actions>
4874                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4875                 <retrieve/>
4876                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4877                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4878             </actions>
4879         </permacrud>
4880         </class>
4881
4882         <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">
4883                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
4884                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
4885                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
4886                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
4887                         <field reporter:label="Ratio" name="ratio" />
4888                 </fields>
4889                 <links>
4890                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
4891                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
4892                 </links>
4893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4894                         <actions>
4895                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4896                                 <retrieve/>
4897                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4898                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4899                         </actions>
4900                 </permacrud>
4901         </class>
4902
4903         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
4904                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
4905                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4906                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4907                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4908                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4909                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4910                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
4911                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
4912                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
4913                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
4914                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
4915                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
4916                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4917                         <field reporter:label="Email" name="email" reporter:datatype="text" />
4918                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
4919                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
4920                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
4921                 </fields>
4922                 <links>
4923                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4924                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4925             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
4926             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
4927             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
4928                 </links>
4929         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4930             <actions>
4931                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
4932                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
4933                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
4934                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
4935             </actions>
4936         </permacrud>
4937         </class>
4938
4939         <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">
4940                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
4941                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
4942                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4943                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4944                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4945                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4946                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4947                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
4948                 </fields>
4949                 <links>
4950                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4951                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4952                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4953                 </links>
4954         </class>
4955
4956         <class id="acqipm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_payment_method" oils_persist:tablename="acq.invoice_payment_method" reporter:label="Invoice Payment Method">
4957                 <fields oils_persist:primary="code">
4958                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
4959                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4960                 </fields>
4961                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4962             <actions>
4963                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
4964                 <retrieve/>
4965                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
4966                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
4967             </actions>
4968                 </permacrud>
4969         </class>
4970
4971         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
4972                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
4973                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
4974                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
4975                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4976                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
4977                         <field reporter:label="Receive Date/Time" name="recv_date" reporter:datatype="timestamp" />
4978                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
4979                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
4980                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
4981                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
4982                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
4983                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4984                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
4985                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
4986                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
4987                 </fields>
4988                 <links>
4989                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
4990                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4991                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
4992                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
4993                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
4994                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
4995                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
4996                 </links>
4997         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4998             <actions>
4999                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
5000                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
5001                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
5002                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
5003             </actions>
5004         </permacrud>
5005         </class>
5006
5007         <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">
5008                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
5009                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5010                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5011                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5012                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
5013                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
5014                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
5015                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5016                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
5017                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5018                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5019                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5020                 </fields>
5021                 <links>
5022                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5023                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5024                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5025                 </links>
5026         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5027             <actions>
5028                 <create   permission="ADMIN_INVOICE">
5029                                         <context link="invoice" field="receiver"/>
5030                                 </create>
5031                 <retrieve permission="ADMIN_INVOICE">
5032                                         <context link="invoice" field="receiver"/>
5033                                 </retrieve>
5034                 <update   permission="ADMIN_INVOICE">
5035                                         <context link="invoice" field="receiver"/>
5036                                 </update>
5037                                 <delete   permission="ADMIN_INVOICE">
5038                                         <context link="invoice" field="receiver"/>
5039                                 </delete>
5040             </actions>
5041         </permacrud>
5042         </class>
5043
5044         <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">
5045                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
5046                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5047                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5048                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5049                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5050                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
5051                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
5052                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5053                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5054                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5055                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5056                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5057                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5058                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
5059                 </fields>
5060                 <links>
5061                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5062                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5063                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5064                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5065                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5066                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
5067                 </links>
5068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5069             <actions>
5070                 <create   permission="ADMIN_INVOICE">
5071                                         <context link="invoice" field="receiver"/>
5072                                 </create>
5073                 <retrieve permission="ADMIN_INVOICE">
5074                                         <context link="invoice" field="receiver"/>
5075                                 </retrieve>
5076                 <update   permission="ADMIN_INVOICE">
5077                                         <context link="invoice" field="receiver"/>
5078                                 </update>
5079                                 <delete   permission="ADMIN_INVOICE">
5080                                         <context link="invoice" field="receiver"/>
5081                                 </delete>
5082             </actions>
5083         </permacrud>
5084         </class>
5085
5086         <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">
5087                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5088                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5089                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5090                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5091                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5092                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5093                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5094                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5095                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5096                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5097                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5098                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5099                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5100                 </fields>
5101                 <links>
5102                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5103                 </links>
5104         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5105             <actions>
5106                 <create permission="ADMIN_PROVIDER">
5107                     <context link="provider" field="owner"/>
5108                 </create>
5109                 <retrieve permission="ADMIN_PROVIDER">
5110                     <context link="provider" field="owner"/>
5111                 </retrieve>
5112                 <update permission="ADMIN_PROVIDER">
5113                     <context link="provider" field="owner"/>
5114                 </update>
5115                 <delete permission="ADMIN_PROVIDER">
5116                     <context link="provider" field="owner"/>
5117                 </delete>
5118             </actions>
5119         </permacrud>
5120         </class>
5121
5122         <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">
5123                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5124                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5125                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5126                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5127                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5128                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5129                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5130         </fields>
5131                 <links>
5132                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5133                 </links>
5134         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5135             <actions>
5136                 <create permission="ADMIN_PROVIDER">
5137                     <context link="provider" field="owner"/>
5138                 </create>
5139                 <retrieve permission="ADMIN_PROVIDER">
5140                     <context link="provider" field="owner"/>
5141                 </retrieve>
5142                 <update permission="ADMIN_PROVIDER">
5143                     <context link="provider" field="owner"/>
5144                 </update>
5145                 <delete permission="ADMIN_PROVIDER">
5146                     <context link="provider" field="owner"/>
5147                 </delete>
5148             </actions>
5149         </permacrud>
5150     </class>
5151         <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">
5152                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
5153                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
5154                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5155                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5156                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5157                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
5158                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5159                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5160                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
5161                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
5162                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
5163                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
5164                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5165                 </fields>
5166                 <links>
5167                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
5168                 </links>
5169         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5170             <actions>
5171                 <create permission="ADMIN_PROVIDER">
5172                     <context link="contact" jump='provider' field="owner"/>
5173                 </create>
5174                 <retrieve permission="ADMIN_PROVIDER">
5175                     <context link="contact" jump='provider' field="owner"/>
5176                 </retrieve>
5177                 <update permission="ADMIN_PROVIDER">
5178                     <context link="contact" jump='provider' field="owner"/>
5179                 </update>
5180                 <delete permission="ADMIN_PROVIDER">
5181                     <context link="contact" jump='provider' field="owner"/>
5182                 </delete>
5183             </actions>
5184         </permacrud>
5185         </class>
5186
5187         <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">
5188                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
5189                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
5190                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
5191                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
5192                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
5193                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
5194                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
5195                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
5196                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5197                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
5198                 </fields>
5199                 <links>
5200                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
5201                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
5202                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
5203                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
5204                 </links>
5205                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5206                 </permacrud>
5207         </class>
5208
5209         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
5210                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
5211                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='id'/>
5212                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
5213                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
5214                 </fields>
5215                 <links>
5216             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
5217                 </links>
5218                 <!--
5219                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5220                         But here's what it should look like if we ever do use pcrud.
5221                 -->
5222                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5223                         <actions>
5224                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5225                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5226                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5227                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5228                         </actions>
5229                 </permacrud>
5230         </class>
5231
5232         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
5233                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
5234                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='id'/>
5235                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
5236                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
5237                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
5238                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
5239                 </fields>
5240                 <links>
5241                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5242                 </links>
5243                 <!--
5244                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5245                         But here's what it should look like if we ever do use pcrud.
5246                 -->
5247                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5248                         <actions>
5249                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5250                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5251                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5252                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5253                         </actions>
5254                 </permacrud>
5255         </class>
5256
5257         <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">
5258                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
5259                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5260                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5261                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5262                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5263                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5264                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5265                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5266                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
5267                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5268                 </fields>
5269                 <links>
5270                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5271                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5272             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
5273             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
5274                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
5275                 </links>
5276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5277             <actions>
5278                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5279                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
5280                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5281                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5282             </actions>
5283         </permacrud>
5284         </class>
5285
5286         <class id="acqfscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">
5287                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
5288                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
5289                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
5290                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5291                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5292                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
5293                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
5294                 </fields>
5295                 <links>
5296                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5297                 </links>
5298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5299                         <actions>
5300                                 <create permission="ADMIN_FUNDING_SOURCE">
5301                     <context link="funding_source" field="owner"/>
5302                 </create>
5303                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
5304                     <context link="funding_source" field="owner"/>
5305                 </retrieve>
5306                                 <update permission="ADMIN_FUNDING_SOURCE">
5307                     <context link="funding_source" field="owner"/>
5308                 </update>
5309                                 <delete permission="ADMIN_FUNDING_SOURCE">
5310                     <context link="funding_source" field="owner"/>
5311                 </delete>
5312                         </actions>
5313                 </permacrud>
5314         </class>
5315
5316         <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">
5317                 <fields oils_persist:primary="id">
5318                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
5319                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
5320                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
5321                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
5322                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
5323                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5324                 </fields>
5325                 <links>
5326                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5327                 </links>
5328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5329                 </permacrud>
5330         </class>
5331
5332         <class id="acqfdeb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">
5333                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
5334                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
5335                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5336                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
5337                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
5338                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5339                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
5340                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
5341                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5342                 </fields>
5343                 <links>
5344                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5345                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5346                 </links>
5347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5348                         <actions>
5349                                 <create permission="ADMIN_ACQ_FUND">
5350                     <context link="fund" field="org"/>
5351                 </create>
5352                                 <retrieve permission="ADMIN_ACQ_FUND">
5353                     <context link="fund" field="org"/>
5354                 </retrieve>
5355                                 <update permission="ADMIN_ACQ_FUND">
5356                     <context link="fund" field="org"/>
5357                 </update>
5358                                 <delete permission="ADMIN_ACQ_FUND">
5359                     <context link="fund" field="org"/>
5360                 </delete>
5361                         </actions>
5362                 </permacrud>
5363         </class>
5364
5365         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
5366                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
5367                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5368                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5369                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5370                         <field reporter:label="Year" name="year" reporter:datatype="int" />
5371                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
5372                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5373                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
5374                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
5375                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5376                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
5377                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
5378                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5379                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5380                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
5381                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
5382                 </fields>
5383                 <links>
5384                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5385                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5386             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
5387             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
5388             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
5389                 </links>
5390         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5391             <actions>
5392                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
5393                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
5394                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
5395                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
5396             </actions>
5397         </permacrud>
5398         </class>
5399
5400         <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">
5401                 <fields oils_persist:primary="fund">
5402                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5403                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5404                 </fields>
5405                 <links>
5406                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5407                 </links>
5408         </class>
5409
5410         <class id="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">
5411                 <fields oils_persist:primary="fund">
5412                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5413                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
5414                 </fields>
5415                 <links>
5416                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5417                 </links>
5418         </class>
5419
5420         <class id="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">
5421                 <fields oils_persist:primary="fund">
5422                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5423                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
5424                 </fields>
5425                 <links>
5426                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5427                 </links>
5428         </class>
5429
5430         <class id="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">
5431                 <fields oils_persist:primary="fund">
5432                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5433                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5434                 </fields>
5435                 <links>
5436                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5437                 </links>
5438         </class>
5439
5440         <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">
5441                 <fields oils_persist:primary="fund">
5442                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5443                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
5444                 </fields>
5445                 <links>
5446                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5447                 </links>
5448         </class>
5449
5450    <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">
5451         <fields oils_persist:primary="fund">
5452             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5453             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5454         </fields>
5455         <links>
5456             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5457         </links>
5458     </class>
5459
5460    <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">
5461         <fields oils_persist:primary="fund">
5462             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5463             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
5464         </fields>
5465         <links>
5466             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5467         </links>
5468     </class>
5469
5470    <class id="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">
5471         <fields oils_persist:primary="fund">
5472             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5473             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5474         </fields>
5475         <links>
5476             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5477         </links>
5478     </class>
5479
5480    <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">
5481         <fields oils_persist:primary="fund">
5482             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5483             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
5484         </fields>
5485         <links>
5486             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5487         </links>
5488     </class>
5489
5490    <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">
5491         <fields oils_persist:primary="fund">
5492             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5493             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
5494         </fields>
5495         <links>
5496             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5497         </links>
5498     </class>
5499
5500         <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">
5501                 <fields oils_persist:primary="funding_source">
5502                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5503                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
5504                 </fields>
5505                 <links>
5506                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5507                 </links>
5508         </class>
5509
5510         <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">
5511                 <fields oils_persist:primary="funding_source">
5512                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5513                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
5514                 </fields>
5515                 <links>
5516                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5517                 </links>
5518         </class>
5519
5520         <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">
5521                 <fields oils_persist:primary="funding_source">
5522                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5523                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
5524                 </fields>
5525                 <links>
5526                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5527                 </links>
5528         </class>
5529
5530         <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">
5531                 <fields oils_persist:primary="fund">
5532                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5533                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
5534                 </fields>
5535                 <links>
5536                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5537                 </links>
5538         </class>
5539
5540         <class id="acqfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">
5541                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
5542                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5543                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5544                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5545                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5546                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5547                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5548                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5549                 </fields>
5550                 <links>
5551                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5552                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5553                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5554                 </links>
5555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5556                         <actions>
5557                                 <create permission="ADMIN_ACQ_FUND">
5558                     <context link="fund" field="org"/>
5559                 </create>
5560                                 <retrieve permission="ADMIN_ACQ_FUND">
5561                     <context link="fund" field="org"/>
5562                 </retrieve>
5563                                 <update permission="ADMIN_ACQ_FUND">
5564                     <context link="fund" field="org"/>
5565                 </update>
5566                                 <delete permission="ADMIN_ACQ_FUND">
5567                     <context link="fund" field="org"/>
5568                 </delete>
5569                         </actions>
5570                 </permacrud>
5571         </class>
5572
5573     <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">
5574         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
5575             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5576             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5577             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5578             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
5579             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
5580             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5581             <field reporter:label="Note" name="note" reporter:datatype="text" />
5582             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5583         </fields>
5584         <links>
5585             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5586             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5587             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5588         </links>
5589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5590                         <actions>
5591                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5592                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5593                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5594                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5595                         </actions>
5596                 </permacrud>
5597     </class>
5598
5599         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
5600                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
5601                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
5602                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5603                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
5604                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5605                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5606                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5607                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
5608                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
5609                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5610                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5611                 </fields>
5612                 <links>
5613                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5614                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5615                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5616                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5617                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
5618                 </links>
5619                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5620                         <actions>
5621                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
5622                         </actions>
5623                 </permacrud>
5624         </class>
5625
5626         <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">
5627                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
5628                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5629                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
5630                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5631                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5632                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
5633                 </fields>
5634                 <links>
5635                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5636                 </links>
5637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5638                         <actions>
5639                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5640                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
5641                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5642                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5643                         </actions>
5644                 </permacrud>
5645         </class>
5646
5647         <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">
5648                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
5649                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
5650                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5651                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5652                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5653                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5654                         <field reporter:label="State" name="state" reporter:datatype="text" />
5655                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
5656                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5657                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5658                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
5659                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5660                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5661                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5662                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
5663                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5664                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
5665                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
5666                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
5667                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
5668                 </fields>
5669                 <links>
5670                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5671                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5672                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5673                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
5674                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5675                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
5676                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
5677                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
5678                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5679                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5680                 </links>
5681                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5682                         <actions>
5683                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5684                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5685                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5686                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5687                         </actions>
5688                 </permacrud>
5689         </class>
5690
5691         <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">
5692                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
5693                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5694                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5695                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5696                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
5697                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
5698                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5699                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5700                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
5701                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5702                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5703                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5704                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5705                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
5706                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5707                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5708                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5709                 </fields>
5710                 <links>
5711                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
5712                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5713                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5714                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5715                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5716                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5717                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5718                 </links>
5719                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5720             <actions>
5721                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5722             </actions>
5723                 </permacrud>
5724         </class>
5725
5726         <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">
5727                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
5728                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5729                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5730                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5731                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5732                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5733                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5734                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
5735                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
5736                 </fields>
5737                 <links>
5738                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5739                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5740                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5741                 </links>
5742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5743             <actions>
5744                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5745                     <context link="purchase_order" field="ordering_agency"/>
5746                 </retrieve>
5747                 <create permission="CREATE_PURCHASE_ORDER">
5748                     <context link="purchase_order" field="ordering_agency"/>
5749                 </create>
5750                 <update permission="CREATE_PURCHASE_ORDER">
5751                     <context link="purchase_order" field="ordering_agency"/>
5752                 </update>
5753                 <delete permission="CREATE_PURCHASE_ORDER">
5754                     <context link="purchase_order" field="ordering_agency"/>
5755                 </delete>
5756             </actions>
5757                 </permacrud>
5758         </class>
5759
5760         <class id="acqpoi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_item" oils_persist:tablename="acq.po_item" reporter:label="Purchase Order Item">
5761                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
5762                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5763                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5764                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5765                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
5766                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5767                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
5768                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5769                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
5770                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
5771                 </fields>
5772                 <links>
5773                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5774                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5775                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5776                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5777                 </links>
5778                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5779             <actions>
5780                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5781                     <context link="purchase_order" field="ordering_agency"/>
5782                 </retrieve>
5783                 <create permission="CREATE_PURCHASE_ORDER">
5784                     <context link="purchase_order" field="ordering_agency"/>
5785                 </create>
5786                 <update permission="CREATE_PURCHASE_ORDER">
5787                     <context link="purchase_order" field="ordering_agency"/>
5788                 </update>
5789                 <delete permission="CREATE_PURCHASE_ORDER">
5790                     <context link="purchase_order" field="ordering_agency"/>
5791                 </delete>
5792             </actions>
5793                 </permacrud>
5794         </class>
5795
5796         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
5797                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
5798                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
5799                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
5800                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
5801                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5802                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5803                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5804                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5805                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
5806                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
5807                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
5808                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
5809                         <field reporter:label="State" name="state" reporter:datatype="text" />
5810                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5811                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5812                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
5813                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5814                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5815                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
5816                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
5817                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
5818                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
5819                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
5820                         <field reporter:label="Envoice Enties" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
5821                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
5822                 </fields>
5823                 <links>
5824                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5825                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5826                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5827                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5828                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5829                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5830                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5831                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
5832                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
5833                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
5834                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5835                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
5836                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
5837                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
5838                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
5839                 </links>
5840                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5841                         <actions>
5842                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
5843                                         <context link="purchase_order" field="ordering_agency"/>
5844                                         <context link="picklist" field="org_unit"/>
5845                                 </retrieve>
5846                         </actions>
5847                 </permacrud>
5848         </class>
5849
5850         <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">
5851                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
5852                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5853                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5854                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5855                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
5856                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5857                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5858                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
5859                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5860                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5861                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
5862                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
5863                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5864                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5865                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5866                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
5867                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
5868                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5869                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
5870                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5871                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5872                 </fields>
5873                 <links>
5874                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
5875                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5876                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5877                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5878                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5879                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5880                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5881                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5882                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5883                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
5884                 </links>
5885                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5886                         <actions>
5887                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5888                                         <context link="purchase_order" field="ordering_agency"/>
5889                                         <context link="picklist" field="org_unit"/>
5890                                 </retrieve>
5891                         </actions>
5892                 </permacrud>
5893         </class>
5894
5895         <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">
5896                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
5897                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
5898                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
5899                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5900                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
5901                 </fields>
5902                 <links>
5903                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5904                 </links>
5905                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5906                         <actions>
5907                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5908                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
5909                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5910                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5911                         </actions>
5912                 </permacrud>
5913         </class>
5914
5915         <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">
5916                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
5917                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
5918                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
5919                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5920                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5921                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5922                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5923                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5924                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
5925                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
5926                 </fields>
5927                 <links>
5928                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5929                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5930                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5931                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
5932                 </links>
5933         </class>
5934
5935         <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">
5936                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
5937                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
5938                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
5939                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
5940                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
5941                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
5942                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
5943                 </fields>
5944                 <links>
5945                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5946                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
5947                 </links>
5948         </class>
5949
5950         <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">
5951                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
5952                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
5953                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5954                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
5955                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
5956                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
5957                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
5958                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5959                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
5960                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
5961                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
5962                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
5963                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5964                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
5965                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5966                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
5967                 </fields>
5968                 <links>
5969                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5970                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
5971                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5972                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5973                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5974                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5975                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5976                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5977                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
5978                 </links>
5979         </class>
5980
5981         <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">
5982                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5983                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5984                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5985                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5986                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5987                 </fields>
5988                 <links/>
5989                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5990                         <actions>
5991                                 <retrieve />
5992                         </actions>
5993                 </permacrud>
5994         </class>
5995
5996         <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">
5997                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5998                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5999                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6000                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6001                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6002                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6003             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6004                 </fields>
6005                 <links/>
6006         <permacrud>
6007             <actions>
6008                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6009                 <retrieve />
6010                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6011                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6012             </actions>
6013         </permacrud>
6014         </class>
6015
6016         <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">
6017                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6018                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6019                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6020                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6021                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6022                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6023                 </fields>
6024                 <links/>
6025         </class>
6026         <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">
6027                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6028                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6029                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6030                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6031                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6032                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6033                 </fields>
6034                 <links>
6035                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6036                 </links>
6037         </class>
6038
6039         <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">
6040             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6041                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6042                 <field reporter:label="Code" name="code" reporter:datatype="text" />
6043                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6044                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6045                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6046                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6047         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6048
6049             </fields>
6050             <links>
6051                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6052             </links>
6053             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6054                 <actions>
6055                     <create permission="ADMIN_PROVIDER">
6056                         <context link="provider" field="owner"/>
6057                     </create>
6058                     <retrieve permission="ADMIN_PROVIDER">
6059                         <context link="provider" field="owner"/>
6060                     </retrieve>
6061                     <update permission="ADMIN_PROVIDER">
6062                         <context link="provider" field="owner"/>
6063                     </update>
6064                     <delete permission="ADMIN_PROVIDER">
6065                         <context link="provider" field="owner"/>
6066                     </delete>
6067                 </actions>
6068             </permacrud>
6069         </class>
6070         
6071         <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">
6072             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6073                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6074                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6075                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6076                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6077             </fields>
6078             <links>
6079                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6080             </links>
6081             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6082                 <actions>
6083                     <create permission="ADMIN_PROVIDER">
6084                         <context link="provider" field="owner"/>
6085                     </create>
6086                     <retrieve permission="ADMIN_PROVIDER">
6087                         <context link="provider" field="owner"/>
6088                     </retrieve>
6089                     <update permission="ADMIN_PROVIDER">
6090                         <context link="provider" field="owner"/>
6091                     </update>
6092                     <delete permission="ADMIN_PROVIDER">
6093                         <context link="provider" field="owner"/>
6094                     </delete>
6095                 </actions>
6096             </permacrud>
6097         </class>
6098         
6099         <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">
6100             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6101                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6102                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6103                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6104                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6105                 </fields>
6106                 <links/>
6107         </class>
6108
6109         <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">
6110                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6111                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6112                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6113                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6114                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6115                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6116                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6117                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6118                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6119                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6120                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6121                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6122                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6123                 </fields>
6124                 <links>
6125                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6126                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6127                 </links>
6128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6129             <actions>
6130                 <create permission="ADMIN_PROVIDER">
6131                     <context link="provider" field="owner"/>
6132                 </create>
6133                 <retrieve permission="ADMIN_PROVIDER">
6134                     <context link="provider" field="owner"/>
6135                 </retrieve>
6136                 <update permission="ADMIN_PROVIDER">
6137                     <context link="provider" field="owner"/>
6138                 </update>
6139                 <delete permission="ADMIN_PROVIDER">
6140                     <context link="provider" field="owner"/>
6141                 </delete>
6142             </actions>
6143         </permacrud>
6144         </class>
6145
6146         <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">
6147                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
6148                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
6149                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
6150                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
6151                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
6152                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
6153                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
6154                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
6155                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
6156                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
6157                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
6158                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
6159                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
6160                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
6161                 </fields>
6162                 <links>
6163                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
6164                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6165                 </links>
6166         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6167             <actions>
6168                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6169                     <context link="account" jump="provider" field="owner"/>
6170                 </retrieve>
6171                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6172                     <context link="account" jump="provider" field="owner"/>
6173                 </update>
6174                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6175                     <context link="account" jump="provider" field="owner"/>
6176                 </delete>
6177             </actions>
6178         </permacrud>
6179         </class>
6180
6181
6182         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
6183                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
6184                         <field name="id" reporter:datatype="id" />
6185                         <field name="parent" reporter:datatype="link"/>
6186                         <field name="owner" reporter:datatype="link"/>
6187                         <field name="create_time" reporter:datatype="timestamp"/>
6188                         <field name="name" reporter:datatype="text"/>
6189                         <field name="shared" reporter:datatype="bool"/>
6190                         <field name="share_with" reporter:datatype="link"/>
6191                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6192                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
6193                 </fields>
6194                 <links>
6195                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6196                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
6197                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
6198                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6199                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
6200                 </links>
6201         </class>
6202         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
6203                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
6204                         <field name="id" reporter:datatype="id" />
6205                         <field name="parent" reporter:datatype="link"/>
6206                         <field name="owner" reporter:datatype="link"/>
6207                         <field name="create_time" reporter:datatype="timestamp"/>
6208                         <field name="name" reporter:datatype="text"/>
6209                         <field name="shared" reporter:datatype="bool"/>
6210                         <field name="share_with" reporter:datatype="link"/>
6211                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6212                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
6213                 </fields>
6214                 <links>
6215                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6216                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
6217                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
6218                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6219                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
6220                 </links>
6221         </class>
6222         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
6223                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
6224                         <field name="id" reporter:datatype="id" />
6225                         <field name="parent" reporter:datatype="link"/>
6226                         <field name="owner" reporter:datatype="link"/>
6227                         <field name="create_time" reporter:datatype="timestamp"/>
6228                         <field name="name" reporter:datatype="text"/>
6229                         <field name="shared" reporter:datatype="bool"/>
6230                         <field name="share_with" reporter:datatype="link"/>
6231                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6232                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6233                 </fields>
6234                 <links>
6235                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6236                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
6237                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
6238                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6239                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
6240                 </links>
6241         </class>
6242         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
6243                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
6244                         <field name="id" reporter:datatype="id" />
6245                         <field name="owner" reporter:datatype="link"/>
6246                         <field name="create_time" reporter:datatype="timestamp"/>
6247                         <field name="name" reporter:datatype="text"/>
6248                         <field name="data" reporter:datatype="text"/>
6249                         <field name="folder" reporter:datatype="link"/>
6250                         <field name="description" reporter:datatype="text"/>
6251                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6252                 </fields>
6253                 <links>
6254                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6255                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
6256                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
6257                 </links>
6258         </class>
6259         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
6260                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
6261                         <field name="id" reporter:datatype="id" />
6262                         <field name="owner" reporter:datatype="link"/>
6263                         <field name="create_time" reporter:datatype="timestamp"/>
6264                         <field name="template" reporter:datatype="link"/>
6265                         <field name="data" reporter:datatype="link"/>
6266                         <field name="folder" reporter:datatype="link"/>
6267                         <field name="recur" reporter:datatype="bool"/>
6268                         <field name="recurrence" reporter:datatype="interval"/>
6269                         <field name="name" reporter:datatype="text"/>
6270                         <field name="description" reporter:datatype="text"/>
6271                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
6272                 </fields>
6273                 <links>
6274                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6275                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
6276                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
6277                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
6278                 </links>
6279         </class>
6280         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
6281                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
6282                         <field name="id" reporter:datatype="id" />
6283                         <field name="runner" reporter:datatype="link"/>
6284                         <field name="start_time" reporter:datatype="timestamp"/>
6285                         <field name="complete_time" reporter:datatype="timestamp"/>
6286                         <field name="run_time" reporter:datatype="timestamp"/>
6287                         <field name="email" reporter:datatype="text"/>
6288                         <field name="excel_format" reporter:datatype="bool"/>
6289                         <field name="csv_format" reporter:datatype="bool"/>
6290                         <field name="html_format" reporter:datatype="bool"/>
6291                         <field name="error_code" reporter:datatype="int"/>
6292                         <field name="error_text" reporter:datatype="text"/>
6293                         <field name="report" reporter:datatype="link"/>
6294                         <field name="folder" reporter:datatype="link"/>
6295                         <field name="chart_pie" reporter:datatype="bool"/>
6296                         <field name="chart_bar" reporter:datatype="bool"/>
6297                         <field name="chart_line" reporter:datatype="bool"/>
6298                 </fields>
6299                 <links>
6300                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
6301                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
6302                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
6303                 </links>
6304         </class>
6305         <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">
6306                 <fields oils_persist:primary="id">
6307                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6308                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6309                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6310                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6311                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6312                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6313                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6314                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6315                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6316                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6317                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6318                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6319                 </fields>
6320                 <links>
6321                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6322                 </links>
6323         </class>
6324         <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">
6325                 <fields oils_persist:primary="id">
6326                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6327                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6328                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6329                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6330                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6331                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6332                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6333                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6334                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6335                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6336                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6337                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6338                 </fields>
6339                 <links>
6340                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6341                 </links>
6342         </class>
6343         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
6344                 <fields oils_persist:primary="id">
6345                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6346                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
6347                         <field reporter:label="Fingerprint" name="fingerprint" />
6348                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6349                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6350                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6351                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6352                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
6353                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6354                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6355                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6356                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
6357                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
6358                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
6359                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6360                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6361                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
6362                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
6363                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
6364                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
6365                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
6366                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
6367                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6368                 </fields>
6369                 <links>
6370                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
6371                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6372                 </links>
6373         </class>
6374         <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">
6375                 <fields oils_persist:primary="id">
6376                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
6377                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
6378                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
6379                 </fields>
6380                 <links>
6381                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
6382                 </links>
6383         </class>
6384         <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">
6385                 <fields oils_persist:primary="id">
6386                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
6387                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
6388                 </fields>
6389                 <links>
6390                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
6391                 </links>
6392         </class>
6393         <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">
6394                 <fields oils_persist:primary="id">
6395                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6396                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
6397                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
6398                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
6399                 </fields>
6400                 <links>
6401                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
6402                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
6403                 </links>
6404         </class>
6405         <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">
6406                 <fields oils_persist:primary="xact">
6407                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6408                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
6409                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
6410                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
6411                 </fields>
6412                 <links>
6413                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6414                 </links>
6415         </class>
6416         <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">
6417                 <fields oils_persist:primary="xact">
6418                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6419                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
6420                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
6421                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
6422                 </fields>
6423                 <links>
6424                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6425                 </links>
6426         </class>
6427         <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)">
6428                 <fields oils_persist:primary="id">
6429                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
6430                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
6431                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
6432                 </fields>
6433                 <links>
6434                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6435                 </links>
6436         </class>
6437         <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">
6438                 <fields oils_persist:primary="id">
6439                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
6440                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
6441                 </fields>
6442                 <links>
6443                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
6444                 </links>
6445         </class>
6446         <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">
6447                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
6448                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
6449                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
6450                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
6451                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
6452                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6453                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
6454                 </fields>
6455                 <links>
6456                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6457                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
6458                 </links>
6459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6460                         <actions>
6461                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6462                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6463                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6464                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6465                         </actions>
6466                 </permacrud>
6467         </class>
6468         <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">
6469                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
6470                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
6471                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
6472                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
6473                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
6474                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6475                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6476                 </fields>
6477                 <links>
6478                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6479                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6480                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6481                 </links>
6482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6483                         <actions>
6484                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
6485                                         <context link="formula" field="owner"/>
6486                                 </create>
6487                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
6488                                         <context link="formula" field="owner"/>
6489                                 </retrieve>
6490                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
6491                                         <context link="formula" field="owner"/>
6492                                 </update>
6493                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
6494                                         <context link="formula" field="owner"/>
6495                                 </delete>
6496                         </actions>
6497                 </permacrud>
6498         </class>
6499
6500         <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">
6501                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
6502                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6503                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6504                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6505                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
6506                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
6507                 </fields>
6508                 <links>
6509                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6510                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6511                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6512                 </links>
6513                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6514                         <actions>
6515                                 <create permission="CREATE_PURCHASE_ORDER">
6516                                         <context link="formula" field="owner"/>
6517                 </create>
6518                                 <retrieve permission="CREATE_PURCHASE_ORDER">
6519                                         <context link="formula" field="owner"/>
6520                 </retrieve>
6521                                 <update permission="CREATE_PURCHASE_ORDER">
6522                                         <context link="formula" field="owner"/>
6523                 </update>
6524                                 <delete permission="CREATE_PURCHASE_ORDER">
6525                                         <context link="formula" field="owner"/>
6526                 </delete>
6527                         </actions>
6528                 </permacrud>
6529         </class>
6530
6531         <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">
6532                 <fields oils_persist:primary="id">
6533                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
6534                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6535                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
6536                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
6537                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
6538                 </fields>
6539                 <links>
6540                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6541                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6542                 </links>
6543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6544                 </permacrud>
6545         </class>
6546
6547         <class id="acqclt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_type" oils_persist:tablename="acq.claim_type" reporter:label="Claim Type">
6548                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
6549                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
6550                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6551                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6552                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6553                 </fields>
6554                 <links>
6555                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6556                 </links>
6557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6558                         <actions>
6559                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6560                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
6561                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6562                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6563                         </actions>
6564                 </permacrud>
6565         </class>
6566
6567         <class id="acqclet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event_type" oils_persist:tablename="acq.claim_event_type" reporter:label="Claim Event Type">
6568                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
6569                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
6570                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6571                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6572                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6573                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
6574                 </fields>
6575                 <links>
6576                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6577                 </links>
6578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6579                         <actions>
6580                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6581                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
6582                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6583                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6584                         </actions>
6585                 </permacrud>
6586         </class>
6587
6588         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
6589                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
6590                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
6591                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
6592                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
6593                 </fields>
6594                 <links>
6595                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
6596                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
6597                 </links>
6598                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6599                 </permacrud>
6600         </class>
6601
6602         <class id="acqcle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
6603                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
6604                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
6605                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
6606                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
6607                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
6608                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6609                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6610                 </fields>
6611                 <links>
6612                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
6613                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
6614                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6615                 </links>
6616                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6617                 </permacrud>
6618         </class>
6619
6620         <class id="acqclp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy" oils_persist:tablename="acq.claim_policy" reporter:label="Claim Policy">
6621                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
6622                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6623                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6624                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
6625                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6626                 </fields>
6627                 <links>
6628                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6629                 </links>
6630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6631             <actions>
6632                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6633                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
6634                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6635                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6636             </actions>
6637                 </permacrud>
6638         </class>
6639
6640         <class id="acqclpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy_action" oils_persist:tablename="acq.claim_policy_action" reporter:label="Claim Policy Action">
6641                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
6642                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
6643                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
6644                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
6645                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
6646                 </fields>
6647                 <links>
6648                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6649                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
6650                 </links>
6651                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6652                         <actions>
6653                                 <create permission="ADMIN_CLAIM_POLICY">
6654                                         <context link="claim_policy" field="org_unit"/>
6655                 </create>
6656                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
6657                                         <context link="claim_policy" field="org_unit"/>
6658                 </retrieve>
6659                                 <update permission="ADMIN_CLAIM_POLICY">
6660                                         <context link="claim_policy" field="org_unit"/>
6661                 </update>
6662                                 <delete permission="ADMIN_CLAIM_POLICY">
6663                                         <context link="claim_policy" field="org_unit"/>
6664                 </delete>
6665                         </actions>
6666                 </permacrud>
6667         </class>
6668
6669     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
6670         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
6671             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6672             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6673             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6674             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
6675             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6676             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
6677             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
6678             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
6679             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
6680             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
6681             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
6682             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
6683             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
6684             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
6685             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6686         </fields>
6687     </class>
6688
6689     <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">
6690         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
6691             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6692             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6693             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6694             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6695             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6696         </fields>
6697     </class>
6698
6699     <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">
6700         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
6701             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6702             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6703             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6704             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6705             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6706             <field reporter:label="City" name="city" reporter:datatype="text"/>
6707             <field reporter:label="State" name="state" reporter:datatype="text"/>
6708             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6709             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6710             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6711         </fields>
6712     </class>
6713
6714     <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">
6715         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
6716             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6717             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6718             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6719             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6720             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6721             <field reporter:label="City" name="city" reporter:datatype="text"/>
6722             <field reporter:label="State" name="state" reporter:datatype="text"/>
6723             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6724             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6725             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6726         </fields>
6727     </class>
6728
6729     <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">
6730         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
6731             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6732             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6733             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6734             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
6735             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
6736             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6737         </fields>
6738     </class>
6739
6740     <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">
6741         <fields>
6742             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6743             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6744             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6745         </fields>
6746                 <links>
6747                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6748                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6749                 </links>
6750     </class>
6751
6752     <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">
6753         <fields>
6754             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6755             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
6756         </fields>
6757                 <links>
6758                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6759                 </links>
6760     </class>
6761
6762     <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">
6763         <fields>
6764             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6765             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6766             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6767         </fields>
6768                 <links>
6769                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6770                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6771                 </links>
6772     </class>
6773
6774     <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">
6775         <fields>
6776             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6777             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
6778         </fields>
6779                 <links>
6780                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6781                 </links>
6782     </class>
6783
6784     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
6785                 <oils_persist:source_definition>
6786
6787             SELECT  DISTINCT l.*
6788               FROM  action.unfulfilled_hold_loops l
6789                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
6790               WHERE l.count = m.max
6791
6792                 </oils_persist:source_definition>
6793         <fields>
6794             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6795             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6796             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6797         </fields>
6798                 <links>
6799                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6800                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6801                 </links>
6802     </class>
6803
6804         <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">
6805                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
6806                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
6807                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
6808                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
6809                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
6810                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="int"/>
6811                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="int"/>
6812                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="int"/>
6813                 </fields>
6814                 <links>
6815                 </links>
6816                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6817                 </permacrud>
6818         </class>
6819
6820         <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">
6821                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
6822                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
6823                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
6824                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6825                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
6826                 </fields>
6827                 <links>
6828                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
6829                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
6830                 </links>
6831                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6832                 </permacrud>
6833         </class>
6834
6835         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
6836                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
6837                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
6838                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
6839                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
6840                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
6841                 </fields>
6842                 <links>
6843                 </links>
6844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6845                 </permacrud>
6846         </class>
6847
6848         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
6849                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
6850                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
6851                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
6852                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6853                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
6854                 </fields>
6855                 <links>
6856                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
6857                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
6858                 </links>
6859                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6860                 </permacrud>
6861         </class>
6862         
6863         <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">
6864                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
6865                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
6866                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
6867                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
6868                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
6869                 </fields>
6870                 <links>
6871                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
6872                 </links>
6873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6874                 </permacrud>
6875         </class>
6876         
6877         <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">
6878                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
6879                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
6880                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6881                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6882                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
6883                 </fields>
6884                 <links>
6885                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6886                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
6887                 </links>
6888                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6889                 </permacrud>
6890         </class>
6891
6892         <class id="qbv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
6893                 <fields oils_persist:primary="name">
6894                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
6895                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6896                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
6897                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6898                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
6899                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
6900                 </fields>
6901                 <links>
6902                 </links>
6903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6904                 </permacrud>
6905         </class>
6906
6907         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
6908                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6909                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6910                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
6911                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6912                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6913                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6914                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6915                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6916                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6917                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6918                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6919                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6920                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6921                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6922                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
6923                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
6924                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
6925                 </fields>
6926                 <links>
6927                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6928                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
6929                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
6930                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6931                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
6932                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
6933                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
6934                 </links>
6935                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6936                 </permacrud>
6937         </class>
6938
6939         <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">
6940                 <fields oils_persist:primary="id" oils_persist:sequence="case_branch_id_seq">
6941                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
6942                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6943                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6944                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
6945                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
6946                 </fields>
6947                 <links>
6948                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6949                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
6950                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
6951                 </links>
6952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6953                 </permacrud>
6954         </class>
6955
6956         <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">
6957                 <fields oils_persist:primary="id" oils_persist:sequence="from_relation_id_seq">
6958                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
6959                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
6960                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
6961                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
6962                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
6963                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
6964                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6965                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
6966                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6967                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
6968                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
6969                 </fields>
6970                 <links>
6971                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
6972                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
6973                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
6974                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
6975                 </links>
6976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6977                 </permacrud>
6978         </class>
6979
6980         <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">
6981                 <fields oils_persist:primary="id" oils_persist:sequence="record_column_id_seq">
6982                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
6983                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
6984                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6985                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6986                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
6987                 </fields>
6988                 <links>
6989                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
6990                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
6991                 </links>
6992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6993                 </permacrud>
6994         </class>
6995
6996         <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">
6997                 <fields oils_persist:primary="id" oils_persist:sequence="select_item_id_seq">
6998                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
6999                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7000                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7001                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7002                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
7003                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
7004                 </fields>
7005                 <links>
7006                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7007                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7008                 </links>
7009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7010                 </permacrud>
7011         </class>
7012
7013         <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">
7014                 <fields oils_persist:primary="id" oils_persist:sequence="order_by_item_id_seq">
7015                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
7016                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7017                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7018                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7019                 </fields>
7020                 <links>
7021                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7022                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7023                 </links>
7024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7025                 </permacrud>
7026         </class>
7027
7028         <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">
7029                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7030                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7031                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7032                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7033                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7034                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7035                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7036                 </fields>
7037                 <links>
7038                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7039                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7040                 </links>
7041                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7042                 </permacrud>
7043         </class>
7044
7045         <class id="xbind" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
7046                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7047                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7048                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7049                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7050                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7051                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7052                 </fields>
7053                 <links>
7054                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7055                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7056                 </links>
7057                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7058                 </permacrud>
7059         </class>
7060
7061         <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">
7062                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7063                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7064                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7065                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7066                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7067                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7068                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7069                 </fields>
7070                 <links>
7071                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7072                 </links>
7073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7074                 </permacrud>
7075         </class>
7076
7077         <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">
7078                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7079                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7080                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7081                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7082                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7083                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7084                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7085                 </fields>
7086                 <links>
7087                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7088                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7089                 </links>
7090                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7091                 </permacrud>
7092         </class>
7093
7094         <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">
7095                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7096                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7097                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7098                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7099                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7100                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7101                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7102                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7103                 </fields>
7104                 <links>
7105                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7106                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7107                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7108                 </links>
7109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7110                 </permacrud>
7111         </class>
7112
7113         <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">
7114                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7115                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7116                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7117                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7118                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7119                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7120                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7121                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7122                 </fields>
7123                 <links>
7124                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7125                 </links>
7126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7127                 </permacrud>
7128         </class>
7129
7130         <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">
7131                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7132                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7133                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7134                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7135                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7136                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7137                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7138                 </fields>
7139                 <links>
7140                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7141                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7142                 </links>
7143                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7144                 </permacrud>
7145         </class>
7146
7147         <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">
7148                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7149                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7150                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7151                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7152                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7153                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7154                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7155                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7156                 </fields>
7157                 <links>
7158                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7159                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7160                 </links>
7161                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7162                 </permacrud>
7163         </class>
7164
7165         <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">
7166                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7167                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7168                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7169                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7170                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7171                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7172                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7173                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7174                 </fields>
7175                 <links>
7176                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7177                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7178                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7179                 </links>
7180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7181                 </permacrud>
7182         </class>
7183
7184         <class id="xisnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
7185                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7186                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7187                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7188                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7189                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7190                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7191                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7192                 </fields>
7193                 <links>
7194                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7195                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7196                 </links>
7197                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7198                 </permacrud>
7199         </class>
7200
7201         <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">
7202                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7203                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7204                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7205                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7206                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7207                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7208                 </fields>
7209                 <links>
7210                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7211                 </links>
7212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7213                 </permacrud>
7214         </class>
7215
7216         <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">
7217                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7218                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7219                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7220                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7221                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7222                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7223                 </fields>
7224                 <links>
7225                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7226                 </links>
7227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7228                 </permacrud>
7229         </class>
7230
7231         <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">
7232                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7233                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7234                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7235                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7236                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7237                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7238                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7239                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7240                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7241                 </fields>
7242                 <links>
7243                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7244                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7245                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7246                 </links>
7247                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7248                 </permacrud>
7249         </class>
7250
7251         <class id="xser" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
7252                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7253                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7254                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7255                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7256                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7257                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7258                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7259                 </fields>
7260                 <links>
7261                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7262                 </links>
7263                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7264                 </permacrud>
7265         </class>
7266
7267         <class id="xstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
7268                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7269                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7270                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7271                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7272                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7273                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7274                 </fields>
7275                 <links>
7276                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7277                 </links>
7278                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7279                 </permacrud>
7280         </class>
7281
7282         <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">
7283                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7284                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7285                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7286                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7287                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7288                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7289                 </fields>
7290                 <links>
7291                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7292                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7293                 </links>
7294                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7295                 </permacrud>
7296         </class>
7297
7298         <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">
7299                 <fields oils_persist:primary="id">
7300                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
7301                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
7302                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
7303                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
7304                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
7305                 </fields>
7306                 <links>
7307                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
7308                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7309                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
7310                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7311                 </links>
7312         </class>
7313
7314         <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">
7315                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
7316                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7317                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
7318                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
7319                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
7320                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7321                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7322                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
7323                 </fields>
7324                 <links/>
7325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7326                         <actions>
7327                                 <retrieve/>
7328                         </actions>
7329                 </permacrud>
7330         </class>
7331
7332         <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">
7333                 <fields oils_persist:primary="ptype_key">
7334                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
7335                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7336                 </fields>
7337                 <links/>
7338                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7339                         <actions>
7340                                 <retrieve/>
7341                         </actions>
7342                 </permacrud>
7343         </class>
7344
7345         <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">
7346                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
7347                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7348                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
7349                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
7350                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7351                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7352                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7353                 </fields>
7354                 <links>
7355                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
7356                 </links>
7357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7358                         <actions>
7359                                 <retrieve/>
7360                         </actions>
7361                 </permacrud>
7362         </class>
7363
7364         <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">
7365                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
7366                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7367                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
7368                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
7369                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7370                 </fields>
7371                 <links>
7372                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7373                 </links>
7374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7375                         <actions>
7376                                 <retrieve/>
7377                         </actions>
7378                 </permacrud>
7379         </class>
7380
7381         <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">
7382                 <fields oils_persist:primary="code">
7383                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
7384                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
7385                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
7386                 </fields>
7387                 <links/>
7388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7389                         <actions>
7390                                 <retrieve/>
7391                         </actions>
7392                 </permacrud>
7393         </class>
7394
7395         <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">
7396                 <oils_persist:source_definition>
7397
7398             SELECT  b.id,
7399                     MAX(dcp.edit_date) AS last_delete_date
7400              FROM   biblio.record_entry b
7401                     JOIN asset.call_number cn ON (cn.record = b.id)
7402                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
7403              WHERE  NOT b.deleted
7404              GROUP BY b.id
7405              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
7406
7407                 </oils_persist:source_definition>
7408                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
7409                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
7410                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
7411                 </fields>
7412                 <links>
7413                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7414                 </links>
7415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7416                         <actions>
7417                                 <retrieve/>
7418                         </actions>
7419                 </permacrud>
7420         </class>
7421
7422         <class id="rhcrpb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib" oils_persist:readonly="true" reporter:core="true" reporter:label="Hold/Copy Ratio per Bib">
7423                 <oils_persist:source_definition>
7424
7425             -- -- If we uncomment the RIGHT JOIN against biblio.record_entry, then we'll get a row for every non-deleted bib, whether it has active holds or not.
7426             -- -- If we expect to use pcrud to query against specific bibs, we probably want to do this.  However, if we're using this to populate a report, we
7427             -- -- may not.
7428             -- SELECT
7429             --     bre.id AS "bib_id",
7430             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
7431             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
7432             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
7433             -- FROM (
7434                 SELECT
7435                     y.bre AS "id",
7436                     COALESCE( x.copy_count, 0 ) AS "copy_count",
7437                     y.hold_count AS "hold_count",
7438                     (y.hold_count::REAL / (CASE WHEN x.copy_count = 0 OR x.copy_count IS NULL THEN 0.1 ELSE x.copy_count::REAL END)) AS "hold_copy_ratio"
7439                 FROM (
7440                         SELECT
7441                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
7442                             COUNT(*) AS "hold_count"
7443                         FROM action.hold_request h
7444                         WHERE
7445                             cancel_time IS NULL
7446                             AND fulfillment_time IS NULL
7447                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
7448                         GROUP BY 1
7449                     )y LEFT JOIN (
7450                         SELECT 
7451                             (SELECT id
7452                                 FROM biblio.record_entry 
7453                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
7454                             ) AS "bre", 
7455                             COUNT(*) AS "copy_count"
7456                         FROM asset.copy
7457                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
7458                         WHERE copy.holdable 
7459                             AND NOT copy.deleted 
7460                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
7461                         GROUP BY 1
7462                     )x ON x.bre = y.bre
7463                 -- )z RIGHT JOIN (
7464                 --     SELECT id
7465                 --     FROM biblio.record_entry
7466                 --     WHERE NOT deleted
7467                 -- )bre ON (z.bib_id = bre.id)
7468                 
7469
7470                 </oils_persist:source_definition>
7471                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
7472                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
7473                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
7474                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
7475                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
7476                 </fields>
7477                 <links>
7478                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7479                 </links>
7480                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7481                         <actions>
7482                                 <retrieve/>
7483                         </actions>
7484                 </permacrud>
7485         </class>
7486
7487         <!-- ********************************************************************************************************************* -->
7488         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
7489         <!-- ********************************************************************************************************************* -->
7490         <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">
7491                 <fields oils_persist:primary="id">
7492                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
7493                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
7494                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
7495                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7496                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
7497                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
7498                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
7499                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
7500                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
7501                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
7502                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
7503                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
7504                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
7505                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
7506                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
7507                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
7508                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
7509                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
7510                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
7511                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
7512                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
7513                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
7514                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
7515                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
7516                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
7517                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
7518                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
7519                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
7520                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
7521                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
7522                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
7523                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
7524                 </fields>
7525                 <links>
7526                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7527                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
7528                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
7529                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
7530                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7531                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
7532                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
7533                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
7534                 </links>
7535         </class>
7536
7537         <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">
7538                 <fields oils_persist:primary="id">
7539                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7540                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7541                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7542                 </fields>
7543                 <links>
7544                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7545                 </links>
7546         </class>
7547
7548         <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">
7549                 <fields oils_persist:primary="id">
7550                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7551                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7552                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7553                 </fields>
7554                 <links>
7555                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7556                 </links>
7557         </class>
7558
7559         <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">
7560                 <fields oils_persist:primary="id">
7561                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7562
7563                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
7564                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
7565                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
7566
7567                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
7568                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
7569                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
7570
7571                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
7572                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
7573
7574                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7575                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7576                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
7577
7578                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
7579                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
7580
7581                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
7582                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
7583                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
7584
7585                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
7586                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
7587                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
7588
7589                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
7590                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
7591                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
7592                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
7593
7594                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
7595                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
7596
7597                 </fields>
7598                 <links>
7599                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
7600                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7601                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7602                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7603                 </links>
7604         </class>
7605
7606         <class id="acrlid" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_ready_lineitem_detail" oils_persist:readonly="true" reporter:label="Claim Ready Lineitem Details">
7607                 <oils_persist:source_definition>
7608
7609             SELECT
7610                 po.ordering_agency AS ordering_agency,
7611                 po.id AS purchase_order,
7612                 li.id AS lineitem,
7613                 lid.id AS lineitem_detail,
7614                 cpa.id AS claim_policy_action
7615             FROM
7616                 acq.lineitem_detail lid
7617                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
7618                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
7619                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
7620                 JOIN acq.claim_policy_action cpa ON (
7621                     cpa.claim_policy = cp.id
7622
7623                     -- we only care about claim policy actions whose claim
7624                     -- interval we'd reached or exceeded
7625                     AND (NOW() - cpa.action_interval) &gt; po.order_date
7626
7627                     -- filter out all claim policy actions where claim events
7628                     -- have occurred on or after the action's action_interval
7629                     AND NOT EXISTS (
7630                         SELECT 1
7631                         FROM
7632                             acq.claim_event evt
7633                             JOIN acq.claim claim ON (
7634                                 claim.id = evt.claim
7635                                 AND claim.lineitem_detail = lid.id
7636                             )
7637                         WHERE
7638                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
7639                     )
7640                 )
7641             WHERE
7642                 lid.cancel_reason IS NULL
7643                 AND li.cancel_reason IS NULL -- belt/suspenders
7644                 AND po.cancel_reason IS NULL -- belt/suspenders
7645                 AND lid.recv_time IS NULL
7646                 AND po.state = 'on-order'
7647             ORDER BY 1, 2, 3, 4, 5
7648
7649                 </oils_persist:source_definition>
7650                 <fields>
7651                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7652                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7653                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7654                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7655                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
7656                 </fields>
7657                 <links>
7658                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7659                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7660                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7661                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7662                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
7663                 </links>
7664         </class>
7665
7666         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
7667                 <oils_persist:source_definition>
7668
7669             SELECT 
7670                 li.id AS lineitem, 
7671                 (
7672                     SELECT COUNT(lid.id) 
7673                     FROM acq.lineitem_detail lid
7674                     WHERE lineitem = li.id
7675                 ) AS item_count,
7676                 (
7677                     SELECT COUNT(lid.id) 
7678                     FROM acq.lineitem_detail lid
7679                     WHERE recv_time IS NOT NULL AND lineitem = li.id
7680                 ) AS recv_count,
7681                 (
7682                     SELECT COUNT(lid.id) 
7683                     FROM acq.lineitem_detail lid
7684                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
7685                 ) AS cancel_count,
7686                 (
7687                     SELECT COUNT(lid.id) 
7688                     FROM acq.lineitem_detail lid
7689                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
7690                     WHERE NOT debit.encumbrance AND lineitem = li.id
7691                 ) AS invoice_count,
7692                 (
7693                     SELECT COUNT(DISTINCT(lid.id)) 
7694                     FROM acq.lineitem_detail lid
7695                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
7696                     WHERE lineitem = li.id
7697                 ) AS claim_count,
7698                 (
7699                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
7700                     FROM acq.lineitem_detail lid
7701                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
7702                 ) AS estimated_amount,
7703                 (
7704                     SELECT SUM(debit.amount)::NUMERIC(8,2)
7705                     FROM acq.lineitem_detail lid
7706                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
7707                     WHERE debit.encumbrance AND lineitem = li.id
7708                 ) AS encumbrance_amount,
7709                 (
7710                     SELECT SUM(debit.amount)::NUMERIC(8,2)
7711                     FROM acq.lineitem_detail lid
7712                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
7713                     WHERE NOT debit.encumbrance AND lineitem = li.id
7714                 ) AS paid_amount
7715
7716                 FROM acq.lineitem AS li
7717         </oils_persist:source_definition>
7718                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
7719                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7720                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7721                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
7722                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
7723                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
7724                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
7725                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
7726                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
7727                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
7728                 </fields>
7729                 <links>
7730                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7731                 </links>
7732     </class>
7733
7734
7735         <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">
7736                 <oils_persist:source_definition>
7737
7738                         SELECT  t.*
7739                           FROM  action.transit_copy t
7740                                 JOIN actor.org_unit AS s ON (t.source = s.id)
7741                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
7742                           WHERE s.parent_ou &lt;&gt; d.parent_ou
7743
7744                 </oils_persist:source_definition>
7745                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7746                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
7747                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
7748                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7749                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
7750                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
7751                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
7752                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
7753                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7754                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7755                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7756                 </fields>
7757                 <links>
7758                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
7759                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7760                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7761                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7762                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7763                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
7764                 </links>
7765         </class>
7766
7767     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
7768                 <oils_persist:source_definition>
7769
7770         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
7771                 SELECT
7772                         cp.id as copy,
7773                         COUNT(circ.id),
7774                         EXTRACT(YEAR FROM circ.xact_start) AS year,
7775                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
7776                 FROM
7777                         asset.copy cp
7778                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
7779                 GROUP BY 1, 3, 4
7780                 UNION
7781                 SELECT
7782                         cp.id as copy,
7783                         COUNT(circ.id),
7784                         EXTRACT(YEAR FROM circ.xact_start) AS year,
7785                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
7786                 FROM
7787                         asset.copy cp
7788                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
7789                 GROUP BY 1, 3, 4
7790                 UNION
7791                 SELECT
7792                         id as copy,
7793                         circ_count,
7794                         -1 AS year,
7795                         false as is_renewal
7796                 FROM
7797                         extend_reporter.legacy_circ_count
7798         )x GROUP BY 1, 3, 4
7799
7800                 </oils_persist:source_definition>
7801         <fields>
7802             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
7803             <field reporter:label="Count" name="count" reporter:datatype="int"/>
7804             <field reporter:label="Year" name="year" reporter:datatype="int"/>
7805             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
7806         </fields>
7807                 <links>
7808                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7809                 </links>
7810                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7811                         <actions>
7812                                 <retrieve/>
7813                         </actions>
7814                 </permacrud>
7815     </class>
7816
7817         <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">
7818                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7819                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
7820                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
7821                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
7822                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7823                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
7824                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
7825                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
7826                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
7827                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
7828                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
7829                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
7830                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
7831                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
7832                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
7833                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
7834                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
7835                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
7836                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
7837                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
7838                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
7839                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
7840                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
7841                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
7842                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
7843                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7844                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7845                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7846                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
7847                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
7848                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
7849                 </fields>
7850                 <links>
7851                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7852                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
7853                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
7854                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7855                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
7856                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7857                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7858                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7859                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7860                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7861                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7862                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7863                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
7864                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7865                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7866                 </links>
7867         </class>
7868
7869     <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">
7870         <fields oils_persist:primary="id">
7871             <field reporter:label="Title" name="title" reporter:datatype="text"/>
7872             <field reporter:label="Author" name="author" reporter:datatype="text"/>
7873             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
7874             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7875             <field reporter:label="Price" name="price" reporter:datatype="money"/>
7876             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7877             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
7878             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
7879             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
7880             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
7881             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
7882             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
7883             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
7884             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
7885             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
7886             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
7887             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7888             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7889             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
7890             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
7891             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
7892             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
7893             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7894             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
7895             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7896             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
7897             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
7898             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
7899             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
7900             <field reporter:label="Status" name="status" reporter:datatype="link"/>
7901             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
7902             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
7903             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
7904             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
7905         </fields>
7906         <links>
7907             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7908             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7909             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7910             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7911             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7912         </links>
7913     </class>
7914
7915     <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">
7916         <fields oils_persist:primary="id">
7917             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7918             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7919             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7920             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7921         </fields>
7922         <links>
7923             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7924             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7925         </links>
7926     </class>
7927
7928     <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">
7929         <fields oils_persist:primary="owning_lib">
7930             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7931             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7932             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7933         </fields>
7934         <links>
7935             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7936         </links>
7937     </class>
7938
7939     <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">
7940         <fields oils_persist:primary="id">
7941             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7942             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7943             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7944             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7945             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7946         </fields>
7947         <links>
7948             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7949             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7950             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7951         </links>
7952     </class>
7953
7954     <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">
7955         <fields oils_persist:primary="circ_lib">
7956             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7957             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7958             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7959             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7960         </fields>
7961         <links>
7962             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7963             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7964         </links>
7965     </class>
7966
7967     <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">
7968         <fields oils_persist:primary="id">
7969             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7970             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7971             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7972             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7973             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7974         </fields>
7975         <links>
7976             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7977             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7978             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7979         </links>
7980     </class>
7981
7982     <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">
7983         <fields oils_persist:primary="home_ou">
7984             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7985             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7986             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7987             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7988         </fields>
7989         <links>
7990             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7991             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7992         </links>
7993     </class>
7994         <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">
7995                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
7996                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
7997                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
7998                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
7999                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8000                 </fields>
8001                 <links>
8002                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8003                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
8004                 </links>
8005                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8006                         <actions>
8007                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8008                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
8009                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8010                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8011                         </actions>
8012                 </permacrud>
8013         </class>
8014         <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">
8015                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
8016                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
8017                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
8018                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
8019                 </fields>
8020                 <links>
8021                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8022                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
8023                         </links>
8024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8025                 <actions>
8026                                 <create permission="ADMIN_ACQ_FUND_TAG">
8027                                         <context link="tag" field="owner"/>
8028                                 </create>
8029                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8030                                         <context link="tag" field="owner"/>
8031                                 </retrieve>
8032                                 <update permission="ADMIN_ACQ_FUND_TAG">
8033                                         <context link="tag" field="owner"/>
8034                                 </update>
8035                                 <delete permission="ADMIN_ACQ_FUND_TAG">
8036                                         <context link="tag" field="owner"/>
8037                                 </delete>
8038                         </actions>
8039                 </permacrud>
8040         </class>
8041
8042         <!-- ********************************************************************************************************************* -->
8043
8044 </IDL>
8045
8046 <!--
8047     vim:noet:ts=4:sw=4:
8048 -->