]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Coded Value Maps Opac Visible/Search Labels
[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                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
88                 </fields>
89         </class>
90
91         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
92                 <fields>
93                         <field name="err_msg" oils_persist:virtual="true" />
94                         <field name="type" oils_persist:virtual="true" />
95                 </fields>
96         </class>
97
98         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
99                 <fields>
100                         <field name="err_msg" oils_persist:virtual="true" />
101                         <field name="type" oils_persist:virtual="true" />
102                 </fields>
103         </class>
104
105         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
106                 <fields oils_persist:primary="matchpoint">
107                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
108                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
109                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
110                 </fields>
111                 <links>
112                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
113                 </links>
114         </class>
115
116         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
117         <!-- when the time is right, turn me into a view.  -->
118                 <fields>
119             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
120             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
121             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
122             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
123             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
124             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
125             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
126             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
127             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
128             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
129                 </fields>
130         </class>
131
132         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
133                 <fields>
134                         <field name="public_name" oils_persist:virtual="true" />
135                         <field name="target_url" oils_persist:virtual="true" />
136                         <field name="target_coverage" oils_persist:virtual="true" />
137                         <field name="target_embargo" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <!-- Actually in the DB -->
142         <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">
143                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
144                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
145                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
146                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
147                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
148                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
149                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
150                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
151                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
152                 </fields>
153                 <links>
154                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
155                 </links>
156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
157                         <actions>
158                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
159                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
160                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
161                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
162                         </actions>
163                 </permacrud>
164         </class>
165
166         <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">
167                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
168                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
169                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
170                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
171                 </fields>
172                 <links>
173                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
174                 </links>
175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
176                         <actions>
177                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
180                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
181                         </actions>
182                 </permacrud>
183         </class>
184
185         <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">
186                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
187                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
188                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
189                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
190                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
191                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
192                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
193                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
194                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
195                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
196                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
197                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
198                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
199                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
200                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
201                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
202                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
203                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
204                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
205                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
206                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
207                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
208                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
209                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
210                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
211                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
212                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
213                 </fields>
214                 <links>
215                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
216                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
217                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
218                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
219                 </links>
220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
221                         <actions>
222                                 <create permission="CREATE_IMPORT_ITEM">
223                     <context link="definition" field="owner"/>
224                                 </create>
225                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
226                     <context link="definition" field="owner"/>
227                                 </retrieve>
228                                 <update permission="UPDATE_IMPORT_ITEM">
229                     <context link="definition" field="owner"/>
230                                 </update>
231                                 <delete permission="DELETE_IMPORT_ITEM">
232                     <context link="definition" field="owner"/>
233                                 </delete>
234                         </actions>
235                 </permacrud>
236         </class>
237
238         <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">
239                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
240                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
241                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
242                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
243                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
244                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
245                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
246                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
247                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
248                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
249                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
250                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
251                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
252                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
253                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
254                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
255                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
256                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
257                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
258                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
259                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
260                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
261                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
262                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
263                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
264                 </fields>
265                 <links>
266                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
267                 </links>
268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
269                         <actions>
270                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
271                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
272                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
273                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
274                         </actions>
275                 </permacrud>
276         </class>
277
278         <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">
279                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
280                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
281                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
282                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
283                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
284                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
285                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
286                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
287                 </fields>
288                 <links>
289                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
290                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
291                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
292                 </links>
293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
294                         <actions>
295                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
296                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
297                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
298                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
299                         </actions>
300                 </permacrud>
301         </class>
302
303         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
304                 <fields oils_persist:primary="code">
305                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
306                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
307                 </fields>
308                 <links>
309                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
310                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
311                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
312                 </links>
313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
314                         <actions>
315                                 <retrieve/>
316                         </actions>
317                 </permacrud>
318         </class>
319
320         <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">
321                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
322                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
323                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
324                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
325                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
326                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
327                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
328                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
329                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
330                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
331                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
332                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
333                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
334                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
335                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
336                 </fields>
337                 <links>
338                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
339                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
340                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
341                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
342             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
343             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
344             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
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="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">
357                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
358                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
359                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
360                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
361                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
362                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
363                 </fields>
364                 <links/>
365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
366                         <actions>
367                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
368                 <retrieve/>
369                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
370                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
371                         </actions>
372                 </permacrud>
373         </class>
374
375         <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">
376                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
377                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
378                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
379                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
380                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
381                 </fields>
382                 <links>
383                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
384                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
385                 </links>
386                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
387                         <actions>
388                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
389                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
390                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
391                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
392                         </actions>
393                 </permacrud>
394         </class>
395
396         <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">
397                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
398                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
399                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
400                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
401                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
402                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
403                 </fields>
404                 <links>
405                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
406                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
407                 </links>
408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
409                         <actions>
410                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
411                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
412                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
413                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
414                         </actions>
415                 </permacrud>
416         </class>
417
418         <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">
419                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
420                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
421                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
422                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
423                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
424                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
425                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
426                 </fields>
427                 <links>
428                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
429                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
430                 </links>
431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
432                         <actions>
433                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
434                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
435                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
436                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
437                         </actions>
438                 </permacrud>
439         </class>
440
441         <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">
442                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
443                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
444                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
445                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
446                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
447                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
448                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
449                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
450                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
451                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
452                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
453                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
454                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
455                 </fields>
456                 <links>
457                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
458                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
459                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
460             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
461             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
462                 </links>
463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
464                         <actions>
465                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
466                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
467                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                         </actions>
470                 </permacrud>
471         </class>
472
473         <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">
474                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
475                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
476                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
477                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
478                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
479                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
480                 </fields>
481                 <links/>
482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
483                         <actions>
484                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
485                 <retrieve/>
486                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
487                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
488                         </actions>
489                 </permacrud>
490         </class>
491
492         <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">
493                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
494                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
495                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
496                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
497                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
498                 </fields>
499                 <links>
500                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
501                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
502                 </links>
503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
504                         <actions>
505                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
506                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
507                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
508                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
509                         </actions>
510                 </permacrud>
511         </class>
512
513         <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">
514                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
515                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
516                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
517                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
522                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
523                 </links>
524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
525                         <actions>
526                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
527                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
528                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
529                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
530                         </actions>
531                 </permacrud>
532         </class>
533
534         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
535                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
536                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
537                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
538                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
539                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
540                 </fields>
541                 <links>
542                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
543                 </links>
544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
545                         <actions>
546                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
547                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
548                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
549                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
550                         </actions>
551                 </permacrud>
552         </class>
553
554         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
555                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
556                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
557                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
558                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
559                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
560                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
561                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
562                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
563             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
564                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
565                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
566                 </fields>
567                 <links>
568                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
569                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
570                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
571                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
572                 </links>
573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
574                         <actions>
575                                 <create permission="ADMIN_IMPORT_MATCH_SET">
576                     <context link="match_set" field="owner"/>
577                                 </create>
578                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
579                     <context link="match_set" field="owner"/>
580                                 </retrieve>
581                                 <update permission="ADMIN_IMPORT_MATCH_SET">
582                     <context link="match_set" field="owner"/>
583                                 </update>
584                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
585                     <context link="match_set" field="owner"/>
586                                 </delete>
587                         </actions>
588                 </permacrud>
589         </class>
590
591         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
592                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
593                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
594                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
595                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
596                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
597                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
598                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
599                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
600                 </fields>
601                 <links>
602                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
603                 </links>
604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
605                         <actions>
606                                 <create permission="ADMIN_IMPORT_MATCH_SET">
607                     <context link="match_set" field="owner"/>
608                                 </create>
609                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
610                     <context link="match_set" field="owner"/>
611                                 </retrieve>
612                                 <update permission="ADMIN_IMPORT_MATCH_SET">
613                     <context link="match_set" field="owner"/>
614                                 </update>
615                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
616                     <context link="match_set" field="owner"/>
617                                 </delete>
618                         </actions>
619                 </permacrud>
620         </class>
621
622         <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">
623                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
624                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
625                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
626                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
627                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
628                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
629                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
630                 </fields>
631                 <links>
632                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
633                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
634                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
635                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
636                 </links>
637         </class>
638
639     <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">
640         <fields oils_persist:primary="name">
641             <field reporter:label="Name" name="name" reporter:datatype="text"/>
642             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
643             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
644             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
645         </fields>
646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647             <actions>
648                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
649                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
650                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
651                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
652             </actions>
653         </permacrud>
654     </class>
655
656     <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">
657         <fields oils_persist:primary="id">
658             <field reporter:label="ID" name="id" reporter:datatype="id"/>
659             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
660             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
661             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
662             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
663         </fields>
664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
665             <actions>
666                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
667                 <retrieve/>
668                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
669                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
670             </actions>
671         </permacrud>
672     </class>
673
674         <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">
675                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
676                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
677                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
678                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
679                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
680                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
681                 </fields>
682                 <links>
683                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
684                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
685                 </links>
686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687             <actions>
688                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
689                 <retrieve/>
690                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
691                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
692             </actions>
693         </permacrud>
694         </class>
695
696         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
697                 <fields oils_persist:primary="name">
698                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
699                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
700                         <field reporter:label="Description" name="description" reporter:datatype="text" />
701                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
702                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
703                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
704                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
705                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
706                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
707                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
708                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
709                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
710                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
711                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
712                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
713                 </fields>
714                 <links>
715                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
716                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
717                 </links>
718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
719             <actions>
720                 <create permission="ADMIN_SVF" global_required="true"/>
721                 <retrieve/>
722                 <update permission="ADMIN_SVF" global_required="true"/>
723                 <delete permission="ADMIN_SVF" global_required="true"/>
724             </actions>
725         </permacrud>
726         </class>
727
728         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
729                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
730                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
731                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
732                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
733             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
734                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
735                 </fields>
736                 <links/>
737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
738             <actions>
739                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
740                 <retrieve/>
741                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
742                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
743             </actions>
744         </permacrud>
745         </class>
746
747         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true">
748                 <fields oils_persist:primary="id">
749                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
750                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
751                 </fields>
752                 <links>
753                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
754                 </links>
755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756             <actions>
757                 <retrieve/>
758             </actions>
759         </permacrud>
760         </class>
761
762         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
763                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
764                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
765                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
766                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
767                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
768                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
769                 </fields>
770                 <links>
771                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
772                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
773                 </links>
774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
775             <actions>
776                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <retrieve/>
778                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
779                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780             </actions>
781         </permacrud>
782         </class>
783
784         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
785                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
786                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
787                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
788                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
789                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
790                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
791                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
792                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
793                 </fields>
794                 <links>
795                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
796                 </links>
797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
798             <actions>
799                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
800                 <retrieve/>
801                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
802                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
803             </actions>
804         </permacrud>
805         </class>
806
807         <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">
808                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
809                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
810                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
811                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
812                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
813                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
814                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
815                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
816                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
817                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
818                 </fields>
819                 <links>
820                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
821                 </links>
822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
823             <actions>
824                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
825                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
826                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
827                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
828             </actions>
829         </permacrud>
830         </class>
831
832     <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">
833         <fields oils_persist:primary="name">
834             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
835             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
836             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
837             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
838             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
839             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
840             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
841             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
842             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
843             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
844         </fields>
845         <links>
846             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
847             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
848         </links>
849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
850             <actions>
851                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
852                 <retrieve/>
853                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
854                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
855             </actions>
856         </permacrud>
857     </class>
858
859     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
860         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
861             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
862             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
863             <field reporter:label="Name" name="name" reporter:datatype="text"/>
864             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
865             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
866             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
867             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
868         </fields>
869         <links>
870             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
871         </links>
872     </class>
873
874         <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">
875                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
876                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
877                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
878                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
879                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
880                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
881                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
882                 </fields>
883                 <links>
884             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
885             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
886                 </links>
887                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
888                         <actions>
889                                 <retrieve/>
890                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
891                         </actions>
892                 </permacrud>
893         </class>
894
895         <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">
896                 <fields oils_persist:primary="key">
897                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
898                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
899                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
900                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
901                 </fields>
902                 <links/>
903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
904                         <actions>
905                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
906                                 <retrieve/>
907                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
908                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
909                         </actions>
910                 </permacrud>
911         </class>
912
913         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
914                 <fields oils_persist:primary="module">
915                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
916                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
917                 </fields>
918                 <links/>
919         </class>
920
921         <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">
922                 <fields oils_persist:primary="module">
923                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
924                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
925                 </fields>
926                 <links/>
927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
928                         <actions>
929                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
930                                 <retrieve/>
931                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
932                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
933                         </actions>
934                 </permacrud>
935         </class>
936
937         <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">
938                 <fields oils_persist:primary="module">
939                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
940                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
941                 </fields>
942                 <links/>
943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
944                         <actions>
945                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
946                                 <retrieve/>
947                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
948                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
949                         </actions>
950                 </permacrud>
951         </class>
952
953         <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">
954                 <fields oils_persist:primary="module">
955                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
956                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
957                 </fields>
958                 <links/>
959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960                         <actions>
961                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
962                                 <retrieve/>
963                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
964                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
965                         </actions>
966                 </permacrud>
967         </class>
968
969         <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">
970                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
971                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
972                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
973                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
974                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
975                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
976                 </fields>
977                 <links>
978                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
979                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
980                 </links>
981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
982                         <actions>
983                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
984                     <context link="event_def" field="owner"/>
985                 </create>
986                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
987                     <context link="event_def" field="owner"/>
988                 </retrieve>
989                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
990                     <context link="event_def" field="owner"/>
991                 </update>
992                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
993                     <context link="event_def" field="owner"/>
994                 </delete>
995                         </actions>
996                 </permacrud>
997         </class>
998
999         <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">
1000                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1001                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1002                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1003                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1004                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1005                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1006                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1007                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1008                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1009                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1010                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1011                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1012                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1013                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1014                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1015                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1016                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1017                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1018                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1019                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1020                 </fields>
1021                 <links>
1022                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1023                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1024                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1025                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1026                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1027                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1028                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1029                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1030                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1031                 </links>
1032                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1033                         <actions>
1034                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1035                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1036                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1037                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1038                         </actions>
1039                 </permacrud>
1040         </class>
1041
1042         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1043                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1044                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1045                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1046                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1047                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1048                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1049                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1050                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1051                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1052                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1053                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1054                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1055                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1056                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1057                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1058                 </fields>
1059                 <links>
1060                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1061                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1062                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1063                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1064                 </links>
1065         </class>
1066
1067         <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">
1068                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1069                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1070                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1071                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1072                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1073                 </fields>
1074                 <links>
1075                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1076                 </links>
1077                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1078                         <actions>
1079                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1080                     <context link="event_def" field="owner"/>
1081                 </create>
1082                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1083                     <context link="event_def" field="owner"/>
1084                 </retrieve>
1085                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1086                     <context link="event_def" field="owner"/>
1087                 </update>
1088                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1089                     <context link="event_def" field="owner"/>
1090                 </delete>
1091                         </actions>
1092                 </permacrud>
1093         </class>
1094
1095         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1096                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1097                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1098                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1099                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1100                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1101                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1102                 </fields>
1103                 <links>
1104                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1105                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1106                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1107                 </links>
1108         </class>
1109
1110         <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">
1111                 <fields oils_persist:primary="code">
1112                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1113                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1114                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1115                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1116                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1117                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1118                 </fields>
1119                 <links/>
1120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1121             <actions>
1122                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1123                 <retrieve/>
1124                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1125                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1126             </actions>
1127         </permacrud>
1128         </class>
1129
1130         <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">
1131                 <fields oils_persist:primary="code">
1132                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1133                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1134                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1135                 </fields>
1136                 <links/>
1137         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1138             <actions>
1139                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1140                 <retrieve/>
1141                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1142                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1143             </actions>
1144         </permacrud>
1145         </class>
1146
1147         <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">
1148                 <fields oils_persist:primary="code">
1149                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1150                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1151                 </fields>
1152                 <links/>
1153         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1154             <actions>
1155                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1156                 <retrieve/>
1157                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1158                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1159             </actions>
1160         </permacrud>
1161         </class>
1162
1163         <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">
1164                 <fields oils_persist:primary="code">
1165                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1166                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1167                 </fields>
1168                 <links/>
1169         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1170             <actions>
1171                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1172                 <retrieve/>
1173                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1174                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1175             </actions>
1176         </permacrud>
1177         </class>
1178
1179         <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">
1180                 <fields oils_persist:primary="code">
1181                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1182                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1183                 </fields>
1184                 <links/>
1185         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1186             <actions>
1187                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1188                 <retrieve/>
1189                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1190                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1191             </actions>
1192         </permacrud>
1193         </class>
1194
1195         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1196                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1197                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1198                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1199                 </fields>
1200                 <links/>
1201         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1202             <actions>
1203                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1204                 <retrieve/>
1205                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1206                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1207             </actions>
1208         </permacrud>
1209         </class>
1210
1211         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1212                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1213                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1214                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1215                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1216                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1217                 </fields>
1218         <links>
1219             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1220             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1221             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1222         </links>
1223         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1224             <actions>
1225                 <create permission="UPDATE_COPY">
1226                     <context link="target_copy" field="circ_lib"/>
1227                 </create>
1228                 <retrieve/>
1229                 <update permission="UPDATE_COPY">
1230                     <context link="target_copy" field="circ_lib"/>
1231                 </update>
1232                 <delete permission="UPDATE_COPY">
1233                     <context link="target_copy" field="circ_lib"/>
1234                 </delete>
1235             </actions>
1236         </permacrud>
1237         </class>
1238
1239         <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">
1240                 <fields oils_persist:primary="code">
1241                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1242                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1243                 </fields>
1244                 <links/>
1245         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1246             <actions>
1247                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1248                 <retrieve/>
1249                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1250                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1251             </actions>
1252         </permacrud>
1253         </class>
1254
1255         <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">
1256                 <fields oils_persist:primary="code">
1257                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1258                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1259                 </fields>
1260                 <links/>
1261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1262             <actions>
1263                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1264                 <retrieve/>
1265                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1266                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1267             </actions>
1268         </permacrud>
1269         </class>
1270
1271         <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">
1272                 <fields oils_persist:primary="code">
1273                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1274                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1275                 </fields>
1276                 <links/>
1277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1278             <actions>
1279                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1280                 <retrieve/>
1281                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1282                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1283             </actions>
1284         </permacrud>
1285         </class>
1286
1287     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1288         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1289             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1290             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1291             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1292             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1293             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1294             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1295             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1296             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1297             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1298             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1299             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1300             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1301             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1302             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1303             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1304         </fields>
1305         <links/>
1306         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1307             <actions>
1308                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1309                 <retrieve/>
1310                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1311                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1312             </actions>
1313         </permacrud>
1314     </class>
1315
1316     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1317         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1318             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1319             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1320             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1321             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1322             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1323             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1324             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1325             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1326             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1327             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1328             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1329             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1330             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1331             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1332             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1333         </fields>
1334         <links/>
1335         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1336             <actions>
1337                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1338                 <retrieve/>
1339                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1340                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1341             </actions>
1342         </permacrud>
1343     </class>
1344
1345     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1346         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1347             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1348             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1349             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1350             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1351             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1352         </fields>
1353         <links>
1354             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1355             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1356             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1357         </links>
1358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1359             <actions>
1360                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1361                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1362                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1363                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1364             </actions>
1365         </permacrud>
1366     </class>
1367
1368         <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">
1369                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1370                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1371                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1372                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1373                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1374                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1375                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1376                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1377                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1378                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1379                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1380                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1381                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1382                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1383                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1384                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1385                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1386             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1387                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1388                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1389                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1390                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1391                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1392                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1393                 </fields>
1394                 <links>
1395                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1396                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1397                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1398                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1399                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1400                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1401                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1402                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1403                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1404                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1405                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1406                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1407                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1408             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1409                 </links>
1410         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1411             <actions>
1412                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1413                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1414                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1415                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1416             </actions>
1417         </permacrud>
1418         </class>
1419
1420         <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">
1421                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1422                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1423                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1424                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1425                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1426                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1427                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1428                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1429                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1430                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1431                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1432                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1433                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1434                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1435                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1436             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1437                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1438                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1439             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1440                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1441                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1442                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1443                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1444             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1445             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1446             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1447                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1448                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1449                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1450                 </fields>
1451                 <links>
1452                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1453                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1454                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1455                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1456                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1457                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1458                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1459                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1460                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1461                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1462                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1463                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1464                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1465             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1466                 </links>
1467         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1468             <actions>
1469                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1470                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1471                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1472                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1473             </actions>
1474         </permacrud>
1475         </class>
1476
1477     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1478         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1479             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1480             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1481             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1482         </fields>
1483         <links/>
1484         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1485             <actions>
1486                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1487                 <retrieve/>
1488                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1489                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1490             </actions>
1491         </permacrud>
1492     </class>
1493
1494     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1495         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1496             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1497             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1498             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1499             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1500             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1501             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1502             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1503         </fields>
1504         <links>
1505             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1506         </links>
1507         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1508             <actions>
1509                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1510                 <retrieve/>
1511                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1512                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1513             </actions>
1514         </permacrud>
1515     </class>
1516
1517     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
1518         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1519             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1520             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1521             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1522             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1523             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1524         </fields>
1525         <links>
1526             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1527             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1528         </links>
1529         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1530             <actions>
1531                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1532                     <context link="matchpoint" field="org_unit"/>
1533                 </create>
1534                 <retrieve/>
1535                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1536                     <context link="matchpoint" field="org_unit"/>
1537                 </update>
1538                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1539                     <context link="matchpoint" field="org_unit"/>
1540                 </delete>
1541             </actions>
1542         </permacrud>
1543     </class>
1544
1545     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
1546         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1547             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1548             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1549             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1550         </fields>
1551         <links>
1552             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1553             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1554         </links>
1555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1556             <actions>
1557                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1558                     <context link="limit_set" field="owning_lib"/>
1559                 </create>
1560                 <retrieve/>
1561                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1562                     <context link="limit_set" field="owning_lib"/>
1563                 </update>
1564                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1565                     <context link="limit_set" field="owning_lib"/>
1566                 </delete>
1567             </actions>
1568         </permacrud>
1569     </class>
1570
1571     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
1572         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1573             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1574             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1575             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1576             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1577         </fields>
1578         <links>
1579             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1580             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1581         </links>
1582         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1583             <actions>
1584                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1585                     <context link="limit_set" field="owning_lib"/>
1586                 </create>
1587                 <retrieve/>
1588                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1589                     <context link="limit_set" field="owning_lib"/>
1590                 </update>
1591                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1592                     <context link="limit_set" field="owning_lib"/>
1593                 </delete>
1594             </actions>
1595         </permacrud>
1596     </class>
1597
1598         <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">
1599                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1600                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1601                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1602                 </fields>
1603                 <links/>
1604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1605             <actions>
1606                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1607                 <retrieve/>
1608                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1609                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1610             </actions>
1611         </permacrud>
1612         </class>
1613
1614         <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">
1615                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1616                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1617                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1618                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1619                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1620                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1621                 </fields>
1622                 <links>
1623                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1624                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1625                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1626                 </links>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="ADMIN_SURVEY">
1630                     <context link="survey" field="owner"/>
1631                 </create>
1632                 <retrieve/>
1633                 <update permission="ADMIN_SURVEY">
1634                     <context link="survey" field="owner"/>
1635                 </update>
1636                 <delete permission="ADMIN_SURVEY">
1637                     <context link="survey" field="owner"/>
1638                 </delete>
1639             </actions>
1640         </permacrud>
1641         </class>
1642         <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">
1643                 <fields oils_persist:primary="id" oils_persist:sequence="">
1644                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1645                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1646                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1647                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1648                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1649                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1650                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1651                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1652                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1653                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1654                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1655                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1656                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1657                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1658                 </fields>
1659                 <links>
1660                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1661                 </links>
1662         </class>
1663         <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">
1664                 <fields oils_persist:primary="id" oils_persist:sequence="">
1665                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1666                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1667                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1668                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1669                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1670                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1671                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1672                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1673                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1674                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1675                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1676                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1677                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1678                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1679                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1680                 </fields>
1681                 <links>
1682                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1683                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1684                 </links>
1685         </class>
1686         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1687                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1688                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1689                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1690                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1691                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1692                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1693                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1694                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1695                 </fields>
1696                 <links>
1697                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1698                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1699                 </links>
1700         </class>
1701         <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">
1702                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1703                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1704                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1705                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1706                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1707                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1708                 </fields>
1709                 <links>
1710                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1711                 </links>
1712         </class>
1713         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1714                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1715                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1716                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1717                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1718                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1719                 </fields>
1720                 <links>
1721                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1722                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1723                 </links>
1724         </class>
1725         <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">
1726                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1727                         <field name="field" reporter:datatype="link"/>
1728                         <field name="id" reporter:datatype="id" />
1729                         <field name="source" reporter:datatype="link"/>
1730                         <field name="value" reporter:datatype="text"/>
1731                 </fields>
1732                 <links>
1733                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1734                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1735                 </links>
1736         </class>
1737         <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">
1738                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1739                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1740                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1741                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1742                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1743                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1744                 </fields>
1745                 <links>
1746                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1747                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1748                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1749                 </links>
1750         </class>
1751         <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">
1752                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1753                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1754                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1755                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1756                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1757                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1758                 </fields>
1759                 <links>
1760                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1761                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1762                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1763                 </links>
1764         </class>
1765         <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">
1766                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1767                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1768                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1769                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1770                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1771                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1772                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1773                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1774                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1775                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1776                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1777                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1778                 </fields>
1779                 <links>
1780                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1781                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1782                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1783                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1784                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1785                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1786                 </links>
1787         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1788             <actions>
1789                 <create permission="TRANSIT_COPY" context_field="owner">
1790                     <context link="target_copy" field="circ_lib"/>
1791                 </create>
1792                 <retrieve/>
1793                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1794                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1795             </actions>
1796         </permacrud>
1797         </class>
1798         <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">
1799                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1800                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1801                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1802                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1803                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1804                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1805                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1806                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1807                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1808                 </fields>
1809                 <links>
1810                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1811                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1812                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1813                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1814                 </links>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="ADMIN_SURVEY">
1818                     <context link="survey" field="owner"/>
1819                 </create>
1820                 <retrieve/>
1821                 <update permission="ADMIN_SURVEY">
1822                     <context link="survey" field="owner"/>
1823                 </update>
1824                 <delete permission="ADMIN_SURVEY">
1825                     <context link="survey" field="owner"/>
1826                 </delete>
1827             </actions>
1828         </permacrud>
1829         </class>
1830         <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">
1831                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1832                         <field name="bucket" />
1833                         <field name="id" reporter:datatype="id" />
1834                         <field name="target_copy" reporter:datatype="link"/>
1835                         <field name="create_time" reporter:datatype="timestamp" />
1836                         <field name="pos" reporter:datatype="int" />
1837                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1838                 </fields>
1839                 <links>
1840                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1841                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1842             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1843                 </links>
1844         </class>
1845         <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">
1846                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1847                         <field name="id" reporter:datatype="id" />
1848                         <field name="item" reporter:datatype="link"/>
1849                         <field name="note" reporter:datatype="text" />
1850                 </fields>
1851                 <links>
1852                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1853                 </links>
1854         </class>
1855
1856         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
1857                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1858                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1859                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1860                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1861                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1862                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1863                 </fields>
1864                 <links>
1865                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1866                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1867                 </links>
1868                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1869                         <actions>
1870                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1871                                 <retrieve/>
1872                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1873                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1874                         </actions>
1875                 </permacrud>
1876         </class>
1877
1878         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
1879                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
1880                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1881                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
1882                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1883                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1884                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
1885                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
1886                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1887                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1888                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
1889                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1890                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1891                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
1892                 </fields>
1893                 <links>
1894                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
1895                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1896                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
1897                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1898                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
1899                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
1900                 </links>
1901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1902                         <actions>
1903                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1904                                 <retrieve/>
1905                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1906                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1907                         </actions>
1908                 </permacrud>
1909         </class>
1910
1911         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
1912                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
1913                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1914                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
1915                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1916                 </fields>
1917                 <links>
1918                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
1919                 </links>
1920                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1921                         <actions>
1922                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1923                                 <retrieve/>
1924                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1925                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1926                         </actions>
1927                 </permacrud>
1928         </class>
1929
1930         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
1931                 <fields oils_persist:primary="code">
1932                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
1933                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1934                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1935                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1936                 </fields>
1937                 <links>
1938                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1939                 </links>
1940                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1941                         <actions>
1942                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1943                                 <retrieve/>
1944                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1945                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1946                         </actions>
1947                 </permacrud>
1948         </class>
1949
1950         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
1951                 <fields oils_persist:primary="code">
1952                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
1953                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
1954                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
1955                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
1956                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1957                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
1958                 </fields>
1959                 <links>
1960                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
1961                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
1962                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
1963                 </links>
1964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1965                         <actions>
1966                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1967                                 <retrieve/>
1968                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1969                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1970                         </actions>
1971                 </permacrud>
1972         </class>
1973
1974     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
1975         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
1976             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
1977             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
1978             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
1979         </fields>
1980         <links>
1981             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
1982             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
1983         </links>
1984         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1985             <actions>
1986                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1987                 <retrieve/>
1988                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1989                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1990             </actions>
1991         </permacrud>
1992     </class>
1993
1994         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1995                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1996                         <field name="active" reporter:datatype="bool"/>
1997                         <field name="create_date" reporter:datatype="timestamp"/>
1998                         <field name="creator" />
1999                         <field name="deleted" reporter:datatype="bool"/>
2000                         <field name="edit_date" reporter:datatype="timestamp"/>
2001                         <field name="editor" />
2002                         <field name="id" reporter:datatype="id" />
2003                         <field name="last_xact_id" />
2004                         <field name="marc" />
2005                         <field name="source" />
2006                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2007                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2008                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2009                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2010                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2011                 </fields>
2012                 <links>
2013                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2014                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2015                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2016                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2017                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2018                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2019                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2020                 </links>
2021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2022                         <actions>
2023                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2024                                 <retrieve/>
2025                                 <update permission="UPDATE_MARC" global_required="true"/>
2026                                 <delete permission="UPDATE_MARC" global_required="true"/>
2027                         </actions>
2028                 </permacrud>
2029         </class>
2030         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2031                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2032                         <field name="char_encoding" />
2033                         <field name="id" />
2034                         <field name="record" />
2035                         <field name="record_status" />
2036                         <field name="thesaurus" />
2037                 </fields>
2038                 <links>
2039                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2040                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2041                 </links>
2042         </class>
2043         <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">
2044                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2045                         <field name="id" reporter:datatype="id" />
2046                         <field name="bib" reporter:datatype="link" />
2047                         <field name="authority" reporter:datatype="link" />
2048                 </fields>
2049                 <links>
2050                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2051                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2052                 </links>
2053         </class>
2054         <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">
2055                 <fields oils_persist:primary="code" oils_persist:sequence="">
2056                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2057                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2058                 </fields>
2059                 <links/>
2060         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2061             <actions>
2062                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2063                 <retrieve/>
2064                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2065                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2066             </actions>
2067         </permacrud>
2068         </class>
2069         <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">
2070                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2071                         <field name="accepting_usr" />
2072                         <field name="amount" reporter:datatype="money" />
2073                         <field name="amount_collected" reporter:datatype="money" />
2074                         <field name="approval_code" reporter:datatype="text"/>
2075                         <field name="cash_drawer" reporter:datatype="link"/>
2076                         <field name="cc_first_name" reporter:datatype="text"/>
2077                         <field name="cc_last_name" reporter:datatype="text"/>
2078                         <field name="cc_number" reporter:datatype="text"/>
2079                         <field name="cc_order_number" reporter:datatype="text"/>
2080                         <field name="cc_type" reporter:datatype="text"/>
2081                         <field name="cc_processor" reporter:datatype="text"/>
2082                         <field name="expire_month" reporter:datatype="int" />
2083                         <field name="expire_year" reporter:datatype="int" />
2084                         <field name="id" reporter:datatype="id" />
2085                         <field name="note" reporter:datatype="text"/>
2086                         <field name="payment_ts" reporter:datatype="timestamp"/>
2087                         <field name="xact" reporter:datatype="link"/>
2088                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2089                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2090                 </fields>
2091                 <links>
2092                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2093                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2094                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2095                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2096                 </links>
2097         </class>
2098         <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">
2099                 <fields oils_persist:primary="name">
2100                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2101                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2102                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2103                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2104                 </fields>
2105                 <links/>
2106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2107             <actions>
2108                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2109                 <retrieve/>
2110                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2111                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2112             </actions>
2113         </permacrud>
2114         </class>
2115
2116         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2117                 <fields oils_persist:primary="alias">
2118                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2119                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2120                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2121                 </fields>
2122                 <links>
2123                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2124                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2125                 </links>
2126         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2127             <actions>
2128                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2129                 <retrieve/>
2130                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2131                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2132             </actions>
2133         </permacrud>
2134         </class>
2135
2136         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2137                 <fields oils_persist:primary="name">
2138                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2139                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2140                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2141                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2142                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2143                 </fields>
2144                 <links>
2145                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2146                 </links>
2147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2148             <actions>
2149                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2150                 <retrieve/>
2151                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2152                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2153             </actions>
2154         </permacrud>
2155         </class>
2156
2157         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
2158                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2159                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2160                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2161                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2162                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2163                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2164                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2165                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2166                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2167                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2168                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2169                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2170                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2171                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2172                 </fields>
2173                 <links>
2174                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2175                 </links>
2176         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2177             <actions>
2178                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2179                 <retrieve/>
2180                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2181                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2182             </actions>
2183         </permacrud>
2184         </class>
2185         <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">
2186                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2187                         <field name="id" reporter:datatype="id" />
2188                         <field name="name" reporter:datatype="text"/>
2189                         <field name="xpath" reporter:datatype="text"/>
2190                         <field name="format" reporter:datatype="link"/>
2191                         <field name="first_word" reporter:datatype="bool" />
2192                 </fields>
2193                 <links/>
2194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2195             <actions>
2196                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2197                 <retrieve/>
2198                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2199                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2200             </actions>
2201         </permacrud>
2202         </class>
2203         <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">
2204                 <fields oils_persist:primary="code" oils_persist:sequence="">
2205                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2206                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2207                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2208                 </fields>
2209                 <links/>
2210         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2211             <actions>
2212                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2213                 <retrieve/>
2214                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2215                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2216             </actions>
2217         </permacrud>
2218         </class>
2219         <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">
2220                 <fields oils_persist:primary="code" oils_persist:sequence="">
2221                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2222                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2223                 </fields>
2224                 <links/>
2225         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2226             <actions>
2227                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2228                 <retrieve/>
2229                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2230                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2231             </actions>
2232         </permacrud>
2233         </class>
2234     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
2235         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2236             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2237             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2238             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2239             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2240         </fields>
2241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2242             <actions>
2243                 <retrieve/>
2244             </actions>
2245         </permacrud>
2246     </class>
2247         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
2248                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2249                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2250                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2251                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2252                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2253                 </fields>
2254                 <links>
2255                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2256                 </links>
2257         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2258             <actions>
2259                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2260                 <retrieve/>
2261                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2262                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2263             </actions>
2264         </permacrud>
2265         </class>
2266         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
2267                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2268                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2269                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2270                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2271                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2272                 </fields>
2273                 <links>
2274                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2275                 </links>
2276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2277             <actions>
2278                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2279                 <retrieve/>
2280                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2281                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2282             </actions>
2283         </permacrud>
2284         </class>
2285         <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">
2286                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2287                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2288                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2289                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2290                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2291                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2292                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2293                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2294                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2295                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2296                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2297                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2298                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2299                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2300                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2301                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2302                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2303                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2304                 </fields>
2305                 <links>
2306                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2307                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2308                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2309                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2310                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2311                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2312                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2313                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2314                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2315                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2316                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2317                 </links>
2318         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2319             <actions>
2320                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2321                 <retrieve/>
2322                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2323                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2324             </actions>
2325         </permacrud>
2326         </class>
2327         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2328                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2329                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2330                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2331                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2332                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2333                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2334                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2335                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2336                 </fields>
2337                 <links>
2338                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2339                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2340         </links>
2341         </class>
2342         <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">
2343                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2344                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2345                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2346                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2347                 </fields>
2348                 <links>
2349                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2350                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2351                 </links>
2352         </class>
2353         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2354                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2355                         <field name="id" reporter:datatype="id" />
2356                         <field name="value" oils_persist:i18n="true" />
2357                 </fields>
2358                 <links/>
2359         </class>
2360         <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">
2361                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2362                         <field name="balance_owed" reporter:datatype="money" />
2363                         <field name="total_owed" reporter:datatype="money" />
2364                         <field name="total_paid" reporter:datatype="money" />
2365                         <field name="usr" reporter:datatype="link"/>
2366                 </fields>
2367                 <links>
2368                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2369         </links>
2370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2371             <actions>
2372                 <retrieve permission="VIEW_USER">
2373                     <context link="usr" field="home_ou"/>
2374                 </retrieve>
2375             </actions>
2376         </permacrud>
2377         </class>
2378         <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">
2379                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2380                         <field name="collector" />
2381                         <field name="enter_time" reporter:datatype="timestamp"/>
2382                         <field name="id" reporter:datatype="id" />
2383                         <field name="location" reporter:datatype="link"/>
2384                         <field name="usr" reporter:datatype="link"/>
2385                 </fields>
2386                 <links>
2387                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2388                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2389                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2390                 </links>
2391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2392             <actions>
2393                 <create permission="money.collections_tracker.create" context_field="location"/>
2394                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2395                 <delete permission="money.collections_tracker.create" context_field="location"/>
2396             </actions>
2397         </permacrud>
2398         </class>
2399         <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">
2400                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2401                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2402                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2403                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2404                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2405                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2406                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2407                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2408                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2409                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2410                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2411                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2412                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2413                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2414                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2415                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2416                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2417                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2418                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2419                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2420                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2421                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2422                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2423                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2424                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2425                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2426                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2427                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2428                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2429                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2430                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2431                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2432                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2433                 </fields>
2434                 <links>
2435                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2436                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2437                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2438                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2439                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2440                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2441                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2442                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2443                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2444                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2445                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2446                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2447                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2448                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2449                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2450                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2451                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2452                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2453                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2454                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2455                 </links>
2456         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2457             <actions>
2458                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2459                 <retrieve/>
2460                 <update permission="UPDATE_MARC" global_required="true"/>
2461             </actions>
2462         </permacrud>
2463         </class>
2464         <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">
2465                 <fields oils_persist:primary="id">
2466                         <field name="dow_0_close" />
2467                         <field name="dow_0_open" />
2468                         <field name="dow_1_close" />
2469                         <field name="dow_1_open" />
2470                         <field name="dow_2_close" />
2471                         <field name="dow_2_open" />
2472                         <field name="dow_3_close" />
2473                         <field name="dow_3_open" />
2474                         <field name="dow_4_close" />
2475                         <field name="dow_4_open" />
2476                         <field name="dow_5_close" />
2477                         <field name="dow_5_open" />
2478                         <field name="dow_6_close" />
2479                         <field name="dow_6_open" />
2480                         <field name="id" reporter:datatype="id" />
2481                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2482                 </fields>
2483                 <links>
2484                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2485                 </links>
2486         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2487             <actions>
2488                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2489                 <retrieve/>
2490                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2491                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2492             </actions>
2493         </permacrud>
2494         </class>
2495         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
2496                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2497                         <field name="id" reporter:datatype="id" />
2498                         <field name="record" reporter:datatype="link"/>
2499                         <field name="label" reporter:datatype="text"/>
2500                         <field name="label_sortkey" reporter:datatype="text"/>
2501                 </fields>
2502                 <links>
2503                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2504                 </links>
2505         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2506             <actions>
2507                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2508                 <retrieve/>
2509                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2510                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2511             </actions>
2512         </permacrud>
2513         </class>
2514         <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2516                         <field name="id" reporter:datatype="id" />
2517                         <field name="target_copy" reporter:datatype="link" />
2518                         <field name="part" reporter:datatype="link"/>
2519                 </fields>
2520                 <links>
2521                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2522                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2523                 </links>
2524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2525             <actions>
2526                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2527                 <retrieve/>
2528                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2529                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2530             </actions>
2531         </permacrud>
2532         </class>
2533         <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">
2534                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2535                         <field name="close_end" reporter:datatype="timestamp" />
2536                         <field name="close_start" reporter:datatype="timestamp" />
2537                         <field name="id" reporter:datatype="id" />
2538                         <field name="org_unit" reporter:datatype="org_unit"/>
2539                         <field name="reason" reporter:datatype="text"/>
2540                 </fields>
2541                 <links>
2542                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2543                 </links>
2544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2545             <actions>
2546                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2547                 <retrieve/>
2548                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2549                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2550             </actions>
2551         </permacrud>
2552         </class>
2553         <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">
2554                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2555                         <field name="extended" reporter:datatype="interval"/>
2556                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2557                         <field name="max_renewals" reporter:datatype="int" />
2558                         <field name="name" reporter:datatype="text"/>
2559                         <field name="normal" reporter:datatype="interval"/>
2560                         <field name="shrt" reporter:datatype="interval"/>
2561                 </fields>
2562                 <links>
2563                 </links>
2564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2565             <actions>
2566                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2567                 <retrieve/>
2568                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2569                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2570             </actions>
2571         </permacrud>
2572         </class>
2573
2574         <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">
2575                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2576                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2577                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2578             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2579                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2580             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2581                 </fields>
2582                 <links>
2583             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2584                 </links>
2585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2586             <actions>
2587                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2588                 <retrieve/>
2589                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2590                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2591             </actions>
2592                 </permacrud>
2593         </class>
2594
2595         <class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">
2596                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2597                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2598                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2599                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2600             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2601                 </fields>
2602                 <links>
2603                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2604                 </links>
2605                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2606             <actions>
2607                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2608                 <retrieve/>
2609                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2610                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2611             </actions>
2612                 </permacrud>
2613         </class>
2614
2615         <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">
2616                 <fields oils_persist:primary="id" oils_persist:sequence="">
2617                         <field name="balance_owed" reporter:datatype="money"/>
2618                         <field name="id" reporter:datatype="id" />
2619                         <field name="last_billing_note" reporter:datatype="text"/>
2620                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2621                         <field name="last_billing_type" reporter:datatype="text"/>
2622                         <field name="last_payment_note" reporter:datatype="text"/>
2623                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2624                         <field name="last_payment_type" reporter:datatype="text"/>
2625                         <field name="total_owed" reporter:datatype="money"/>
2626                         <field name="total_paid" reporter:datatype="money"/>
2627                         <field name="usr" reporter:datatype="link"/>
2628                         <field name="xact_finish" reporter:datatype="timestamp" />
2629                         <field name="xact_start" reporter:datatype="timestamp" />
2630                         <field name="xact_type" reporter:datatype="text"/>
2631                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2632                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2633                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2634                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2635                         <field name="billing_location" reporter:datatype="link"/>
2636                 </fields>
2637                 <links>
2638                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2639                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2640                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2641                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2642                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2643                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2644                 </links>
2645         </class>
2646         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2647                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2648                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2649                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2650                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2651                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2652                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2653                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2654                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2655                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2656                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2657                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2658                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2659                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2660                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2661                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2662                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2663                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2664                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2665                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2666                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2667                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2668                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2669                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2670                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2671                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2672                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2673                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2674                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2675                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2676                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2677                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2678                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2679                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2680                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2681                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2682                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2683                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2684                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2685                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2686                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2687                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2688                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2689                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2690                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2691                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2692                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2693                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2694                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2695                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2696                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2697                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2698                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2699                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2700                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2701                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2702                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2703                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2704                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2705                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2706                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2707                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2708                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2709                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2710                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2711                 </fields>
2712                 <links>
2713                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2714                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2715                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2716                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2717                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2718                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2719                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2720                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2721                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2722                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2723                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2724                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2725                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2726                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2727                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2728                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2729                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2730                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2731                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2732                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2733                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2734                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2735                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2736                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2737                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2738                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2739                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2740                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2741                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2742                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2743                 </links>
2744         </class>
2745         <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
2746                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2747                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2748                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2749                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2750                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2751                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2752                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2753                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2754                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2755         </fields>
2756                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2757                         <actions>
2758                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2759                                 <retrieve/>
2760                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2761                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2762                         </actions>
2763                 </permacrud>
2764         </class>
2765         <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
2766                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
2767                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2768                         <field name="usr" reporter:label="User" reporter:datatype="link" />
2769                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
2770                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
2771         </fields>
2772         <links>
2773                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2774                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
2775                 </links>
2776                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2777                         <actions>
2778                                 <retrieve permission="RUN_REPORTS">
2779                                         <context link="usr" field="home_ou" />
2780                                 </retrieve>
2781                         </actions>
2782                 </permacrud>
2783         </class>
2784         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
2785                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
2786                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2787                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
2788                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
2789                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
2790                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
2791                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
2792         </fields>
2793         <links>
2794                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
2795                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
2796                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
2797                 </links>
2798                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2799                         <actions>
2800                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
2801                                         <context link="usr" field="home_ou" />
2802                                         <context link="ws" field="owning_lib" />
2803                                 </retrieve>
2804                                 <create permission="ADMIN_TOOLBAR" context_field="org">
2805                                         <context link="usr" field="home_ou" />
2806                                         <context link="ws" field="owning_lib" />
2807                                 </create>
2808                                 <update permission="ADMIN_TOOLBAR" context_field="org">
2809                                         <context link="usr" field="home_ou" />
2810                                         <context link="ws" field="owning_lib" />
2811                                 </update>
2812                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
2813                                         <context link="usr" field="home_ou" />
2814                                         <context link="ws" field="owning_lib" />
2815                                 </delete>
2816                         </actions>
2817                 </permacrud>
2818         </class>
2819         <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">
2820                 <fields oils_persist:primary="name">
2821                         <field name="name" reporter:datatype="text"/>
2822                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2823                 </fields>
2824                 <links/>
2825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2826                         <actions>
2827                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2828                                 <retrieve/>
2829                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2830                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2831                         </actions>
2832                 </permacrud>
2833         </class>
2834         <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">
2835                 <fields oils_persist:primary="name">
2836                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2837                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2838                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2839                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2840                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2841                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2842                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2843                 </fields>
2844                 <links>
2845                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2846                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2847                 </links>
2848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2849                         <actions>
2850                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2851                                 <retrieve/>
2852                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2853                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2854                         </actions>
2855                 </permacrud>
2856         </class>
2857         <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">
2858                 <fields oils_persist:primary="name">
2859                         <field name="name" reporter:datatype="text"/>
2860                         <field name="label" reporter:datatype="text"/>
2861                         <field name="description" reporter:datatype="text"/>
2862                         <field name="datatype" reporter:datatype="text"/>
2863                         <field name="view_perm" reporter:datatype="link"/>
2864                         <field name="update_perm" reporter:datatype="link"/>
2865                         <field name="fm_class" reporter:datatype="text"/>
2866                         <field name="grp" reporter:datatype="link"/>
2867                 </fields>
2868                 <links>
2869                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2870                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2871                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2872                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2873                 </links>
2874                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2875                         <actions>
2876                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2877                                 <retrieve/>
2878                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2879                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2880                         </actions>
2881                 </permacrud>
2882         </class>
2883         <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">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2885                         <field name="id" />
2886                         <field name="name"  reporter:datatype="text"/>
2887                         <field name="org_unit" reporter:datatype="org_unit"/>
2888                         <field name="value"  reporter:datatype="text"/>
2889                 </fields>
2890                 <links>
2891                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2892                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2893                 </links>
2894         </class>
2895         <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">
2896                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2897                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2898                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2899                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2900                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2901                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2902                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2903                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2904                 </fields>
2905                 <links>
2906                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2907                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2908                 </links>
2909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2910             <actions>
2911                 <create permission="CREATE_COPY_NOTE">
2912                     <context link="owning_copy" field="circ_lib"/>
2913                 </create>
2914                 <retrieve permission="VIEW_COPY_NOTES">
2915                     <context link="owning_copy" field="circ_lib"/>
2916                 </retrieve>
2917                 <update permission="UPDATE_COPY_NOTE">
2918                     <context link="owning_copy" field="circ_lib"/>
2919                 </update>
2920                 <delete permission="DELETE_COPY_NOTE">
2921                     <context link="owning_copy" field="circ_lib"/>
2922                 </delete>
2923             </actions>
2924         </permacrud>
2925         </class>
2926         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2927                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2928                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2929                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2930                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2931                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2932                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2933                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2934                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2935                 </fields>
2936                 <links>
2937                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2938                 </links>
2939         </class>
2940         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2941                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2942                         <field name="fingerprint"  reporter:datatype="text"/>
2943                         <field name="id" reporter:datatype="id" />
2944                         <field name="master_record" reporter:datatype="link"/>
2945                         <field name="mods"  reporter:datatype="text"/>
2946                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2947                 </fields>
2948                 <links>
2949                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2950                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2951                 </links>
2952         </class>
2953         <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">
2954                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2955                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2956                         <field name="name"  reporter:datatype="text"/>
2957                 </fields>
2958                 <links/>
2959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2960             <actions>
2961                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2962                 <retrieve/>
2963                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2964                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2965             </actions>
2966         </permacrud>
2967         </class>
2968         <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">
2969                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2970                         <field name="code"  reporter:datatype="text"/>
2971                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2972                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2973                 </fields>
2974                 <links/>
2975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2976             <actions>
2977                 <create permission="CREATE_PERM" global_required="true"/>
2978                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2979                 <update permission="UPDATE_PERM" global_required="true"/>
2980                 <delete permission="DELETE_PERM" global_required="true"/>
2981             </actions>
2982         </permacrud>
2983         </class>
2984         <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">
2985                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2986                         <field name="id" reporter:datatype="id" />
2987                         <field name="metarecord" reporter:datatype="link"/>
2988                         <field name="source" reporter:datatype="link"/>
2989                 </fields>
2990                 <links>
2991                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2992                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2993                 </links>
2994         </class>
2995         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" oils_persist:tablename="metabib.facet_entry" reporter:label="Combined Facet Entry" oils_persist:readonly="true">
2996                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2997                         <field name="id" reporter:datatype="id" />
2998                         <field name="field" reporter:datatype="link"/>
2999                         <field name="source" reporter:datatype="link"/>
3000                         <field name="value"  reporter:datatype="text"/>
3001                 </fields>
3002                 <links>
3003                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3004                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3005                 </links>
3006         </class>
3007         <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">
3008                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3009                         <field name="id" reporter:datatype="id" />
3010                         <field name="value" reporter:datatype="text"/>
3011                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3012                 </fields>
3013                 <links>
3014                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3015                 </links>
3016         </class>
3017         <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">
3018                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3019                         <field name="id" reporter:datatype="id" />
3020                         <field name="entry" reporter:datatype="link"/>
3021                         <field name="def" reporter:datatype="link"/>
3022                         <field name="source" reporter:datatype="link"/>
3023                 </fields>
3024                 <links>
3025                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3026                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3027                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3028                 </links>
3029         </class>
3030         <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">
3031                 <oils_persist:source_definition>
3032                         SELECT * FROM metabib.author_field_entry
3033                                                 UNION ALL
3034                         SELECT * FROM metabib.keyword_field_entry
3035                                                 UNION ALL
3036                         SELECT * FROM metabib.identifier_field_entry
3037                                                 UNION ALL
3038                         SELECT * FROM metabib.title_field_entry
3039                                                 UNION ALL
3040                         SELECT * FROM metabib.subject_field_entry
3041                                                 UNION ALL
3042                         SELECT * FROM metabib.series_field_entry
3043                 </oils_persist:source_definition>
3044                 <fields>
3045                         <field name="field" reporter:datatype="link"/>
3046                         <field name="id" reporter:datatype="id" />
3047                         <field name="source" reporter:datatype="link"/>
3048                         <field name="value"  reporter:datatype="text"/>
3049                 </fields>
3050                 <links>
3051                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3052                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3053                 </links>
3054         </class>
3055         <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">
3056                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3057                         <field name="field" reporter:datatype="link"/>
3058                         <field name="id" reporter:datatype="id" />
3059                         <field name="source" reporter:datatype="link"/>
3060                         <field name="value"  reporter:datatype="text"/>
3061                 </fields>
3062                 <links>
3063                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3064                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3065                 </links>
3066         </class>
3067         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3068                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3069                         <field name="accepting_usr" reporter:datatype="link"/>
3070                         <field name="amount" reporter:datatype="money" />
3071                         <field name="amount_collected" reporter:datatype="money" />
3072                         <field name="cash_drawer" reporter:datatype="link"/>
3073                         <field name="id" reporter:datatype="id" />
3074                         <field name="note"  reporter:datatype="text"/>
3075                         <field name="payment_ts" reporter:datatype="timestamp"/>
3076                         <field name="xact" reporter:datatype="link"/>
3077                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3078                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3079                 </fields>
3080                 <links>
3081                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3082                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3083                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3084                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3085                 </links>
3086         </class>
3087         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3088                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3089                         <field name="accepting_usr" reporter:datatype="link"/>
3090                         <field name="amount" reporter:datatype="money" />
3091                         <field name="amount_collected" reporter:datatype="money" />
3092                         <field name="id" reporter:datatype="id" />
3093                         <field name="note"  reporter:datatype="text"/>
3094                         <field name="payment_ts" reporter:datatype="timestamp"/>
3095                         <field name="xact" reporter:datatype="link"/>
3096                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3097                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3098                 </fields>
3099                 <links>
3100                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3101                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3102                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3103                 </links>
3104         </class>
3105         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3106                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3107                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3108                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3109                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3110                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3111                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3112                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3113                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3114                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3115                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3116                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3117                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3118                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3119                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3120                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3121                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3122                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3123                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3124                 </fields>
3125                 <links>
3126                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3127                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3128                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3129                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3130                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3131                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3132                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3133                 </links>
3134         </class>
3135
3136         <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">
3137                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3138                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3139                         <field name="name"  reporter:datatype="text"/>
3140                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3141                         <field name="block_list" reporter:datatype="text"/>
3142                         <field name="staff_alert" reporter:datatype="bool"/>
3143                         <field name="org_depth" reporter:datatype="int"/>
3144                 </fields>
3145                 <links/>
3146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3147             <actions>
3148                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3149                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3150                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3151                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3152             </actions>
3153         </permacrud>
3154         </class>
3155         <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">
3156                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3157                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3158                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3159                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3160                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3161                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3162                 </fields>
3163                 <links>
3164                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3165                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3166                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3167         </links>
3168         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3169             <actions>
3170                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3171                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3172                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3173                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3174             </actions>
3175         </permacrud>
3176         </class>
3177         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
3178                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3179                         <field name="holdable" reporter:datatype="bool"/>
3180                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3181                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3182                         <field name="opac_visible" reporter:datatype="bool"/>
3183             <field name="copy_active" reporter:datatype="bool"/>
3184             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3185                 </fields>
3186                 <links/>
3187         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3188             <actions>
3189                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3190                 <retrieve/>
3191                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3192                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3193             </actions>
3194         </permacrud>
3195         </class>
3196         <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">
3197                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3198                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3199                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3200                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3201                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3202                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3203                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3204                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3205                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3206                 </fields>
3207                 <links>
3208                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3209                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3210                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3211                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3212                 </links>
3213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3214                         <actions>
3215                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3216                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3217                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3218                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3219                         </actions>
3220                 </permacrud>
3221         </class>
3222         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3223                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3224                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3225                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3226                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3227                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3228                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3229                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3230                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3231                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3232                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3233                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3234                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3235                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3236                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3237                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3238                 </fields>
3239                 <links>
3240                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3241                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3242                 </links>
3243         </class>
3244         <class id="aal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::address_alert" oils_persist:tablename="actor.address_alert" reporter:label="Address Alert">
3245                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3246                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3247                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3248                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3249                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3250                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3251                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3252                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3253                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3254                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3255                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3256                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3257                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3258                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3259                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3260                 </fields>
3261                 <links>
3262                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3263                 </links>
3264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3265                         <actions>
3266                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3267                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3268                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3269                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3270                         </actions>
3271                 </permacrud>
3272         </class>
3273
3274
3275         <class id="auss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_saved_search" oils_persist:tablename="actor.usr_saved_search" reporter:label="User Saved Search">
3276                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3277                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3278                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3279                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3280                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3281                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3282                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3283                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3284                 </fields>
3285                 <links>
3286                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3287                 </links>
3288         </class>
3289
3290         <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">
3291                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3292                         <field name="call_number" />
3293                         <field name="create_date" reporter:datatype="timestamp"/>
3294                         <field name="creator" reporter:datatype="link"/>
3295                         <field name="id" reporter:datatype="id" />
3296                         <field name="pub" reporter:datatype="bool"/>
3297                         <field name="title"  reporter:datatype="text"/>
3298                         <field name="value"  reporter:datatype="text"/>
3299                 </fields>
3300                 <links>
3301                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3302                 </links>
3303         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3304             <actions>
3305                 <create permission="CREATE_VOLUME_NOTE">
3306                     <context link="call_number" field="owning_lib"/>
3307                 </create>
3308                 <retrieve permission="VIEW_VOLUME_NOTES">
3309                     <context link="call_number" field="owning_lib"/>
3310                 </retrieve>
3311                 <update permission="UPDATE_VOLUME_NOTE">
3312                     <context link="call_number" field="owning_lib"/>
3313                 </update>
3314                 <delete permission="DELETE_VOLUME_NOTE">
3315                     <context link="call_number" field="owning_lib"/>
3316                 </delete>
3317             </actions>
3318         </permacrud>
3319         </class>
3320         <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">
3321                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3322                         <field name="create_date" reporter:datatype="timestamp"/>
3323                         <field name="creator" reporter:datatype="link"/>
3324                         <field name="edit_date" reporter:datatype="timestamp"/>
3325                         <field name="editor" reporter:datatype="link"/>
3326                         <field name="id" reporter:datatype="id" />
3327                         <field name="record" reporter:datatype="link"/>
3328                         <field name="value" reporter:datatype="text"/>
3329                 </fields>
3330                 <links>
3331                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3332                 </links>
3333         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3334             <actions>
3335                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3336                 <retrieve/>
3337                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3338                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3339             </actions>
3340         </permacrud>
3341         </class>
3342         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3343         <oils_persist:source_definition>
3344 SELECT  usr,
3345         SUM(
3346             CASE
3347                 WHEN (
3348                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3349                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3350                 ) THEN 1
3351                 ELSE 0
3352             END
3353         ) AS out,
3354
3355         SUM(
3356             CASE
3357                 WHEN (
3358                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3359                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3360                 ) THEN 1
3361                 ELSE 0
3362             END
3363         ) AS overdue,
3364
3365         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3366         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3367         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3368   FROM  action.circulation
3369   WHERE checkin_time IS NULL
3370   GROUP BY 1
3371         </oils_persist:source_definition>
3372         <fields oils_persist:primary="usr">
3373             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3374             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3375             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3376             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3377             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3378             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3379         </fields>
3380         <links>
3381             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3382         </links>
3383         </class>
3384         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3385         <oils_persist:source_definition>
3386 SELECT  usr,
3387         ARRAY_TO_STRING(ARRAY_ACCUM(
3388             CASE
3389                 WHEN (
3390                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3391                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3392                 ) THEN id
3393                 ELSE 0
3394             END
3395         ),',') AS out,
3396
3397         ARRAY_TO_STRING(ARRAY_ACCUM(
3398             CASE
3399                 WHEN (
3400                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3401                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3402                 ) THEN id
3403                 ELSE 0
3404             END
3405         ),',') AS overdue,
3406
3407         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3408         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3409         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3410   FROM  action.circulation
3411   WHERE checkin_time IS NULL
3412   GROUP BY 1
3413         </oils_persist:source_definition>
3414         <fields oils_persist:primary="usr">
3415             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3416             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3417             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3418             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3419             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3420             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3421         </fields>
3422         <links>
3423             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3424         </links>
3425         </class>
3426         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3427                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3428                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3429                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3430                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3431                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3432                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3433                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3434                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3435                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3436                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3437                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3438                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3439                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3440                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3441                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3442                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3443                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3444                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3445                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3446                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3447                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3448                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3449                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3450                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3451                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3452                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3453                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3454                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3455                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3456                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3457                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3458                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3459                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3460                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3461                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3462                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3463                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3464                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3465                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3466                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3467                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3468                 </fields>
3469                 <links>
3470                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3471                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3472                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3473                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3474                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3475                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3476                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3477                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3478                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3479                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3480                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3481                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3482                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3483                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3484                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3485                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3486                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3487                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3488                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3489                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3490                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3491                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3492                 </links>
3493         </class>
3494         <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">
3495                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3496                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3497                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3498                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3499                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3500                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3501                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3502                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3503                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3504                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3505                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3506                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3507                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3508                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3509                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3510                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3511                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3512                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3513                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3514                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3515                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3516                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3517                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3518                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3519                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3520                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3521                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3522                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3523                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3524                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3525                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3526                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3527                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3528                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3529                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3530                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3531                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3532                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3533                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3534                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3535                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3536                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3537                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3538                 </fields>
3539                 <links>
3540                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3541                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3542                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3543                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3544                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3545                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3546                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3547                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3548                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3549                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3550                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3551                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3552                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3553                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3554                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3555                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3556                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3557                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3558                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3559                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3560                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3561                 </links>
3562         </class>
3563         <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">
3564                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3565                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3566                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3567                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3568                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3569                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3570                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3571                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3572                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3573                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3574                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3575                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3576                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3577                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3578                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3579                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3580                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3581                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3582                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3583                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3584                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3585                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3586                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3587                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3588                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3589                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3590                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3591                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3592                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3593                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3594                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3595                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3596                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3597                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3598                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3599                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3600                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3601                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3602                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3603                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3604                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3605                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3606                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3607                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3608                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3609                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3610                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3611                 </fields>
3612                 <links>
3613                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3614                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3615                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3616                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3617                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3618                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3619                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3620                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3621                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3622                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3623                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3624                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3625                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3626                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3627                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3628                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3629                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3630                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3631                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3632                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3633                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3634                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3635                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3636                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3637                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3638                 </links>
3639         </class>
3640
3641         <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">
3642                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3643                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3644                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3645                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3646                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3647                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3648                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3649                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3650                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3651                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3652                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3653                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3654                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3655                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3656                 </fields>
3657                 <links>
3658                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3659                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3660                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3661                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3662                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3663                 </links>
3664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3665                         <actions>
3666                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3667                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3668                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3669                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3670                         </actions>
3671                 </permacrud>
3672         </class>
3673
3674         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3675                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3676                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3677                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3678                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3679                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3680                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3681                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3682                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3683                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3684                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3685                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3686                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3687                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3688                 </fields>
3689                 <links>
3690                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3691                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3692                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3693                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3694                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3695                 </links>
3696                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3697                         <actions>
3698                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3699                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3700                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3701                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3702                         </actions>
3703                 </permacrud>
3704         </class>
3705         
3706         <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">
3707                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3708                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3709                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3710                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3711                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3712                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3713                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3714                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3715                 </fields>
3716                 <links>
3717                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3718                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3719                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3720                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3721                 </links>
3722                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3723                         <actions>
3724                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3725                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3726                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3727                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3728                         </actions>
3729                 </permacrud>
3730         </class>
3731         
3732         <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">
3733                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3734                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3735                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3736                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3737                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3738                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3739                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3740                 </fields>
3741                 <links>
3742                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3743                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3744                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3745                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3746                 </links>
3747                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3748                         <actions>
3749                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3750                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3751                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3752                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3753                         </actions>
3754                 </permacrud>
3755         </class>
3756         
3757         <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">
3758                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3759                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3760                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3761                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3762                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3763                 </fields>
3764                 <links>
3765                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3766                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3767                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3768                 </links>
3769                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3770                         <actions>
3771                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3772                     <context link="resource" field="owner" />
3773                 </create>
3774                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3775                     <context link="resource" field="owner" />
3776                 </retrieve>
3777                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3778                     <context link="resource" field="owner" />
3779                 </update>
3780                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3781                     <context link="resource" field="owner" />
3782                 </delete>
3783                         </actions>
3784                 </permacrud>
3785         </class>
3786         
3787         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3788                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3789                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3790                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3791                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3792                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3793                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3794                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3795                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3796                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3797                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3798                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3799                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3800                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3801                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3802                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3803                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3804                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3805                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3806                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3807                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3808                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3809                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3810                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3811                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3812                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3813                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3814                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3815                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3816                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3817                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3818                 </fields>
3819                 <links>
3820                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3821                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3822                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3823                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3824                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3825                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3826                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3827                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3828                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3829                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3830                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3831                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3832                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3833                 </links>
3834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3835                         <actions>
3836                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3837                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3838                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3839                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3840                         </actions>
3841                 </permacrud>
3842         </class>
3843         
3844         <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">
3845                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3846                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3847                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3848                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3849                 </fields>
3850                 <links>
3851                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3852                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3853                 </links>
3854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3855                         <actions>
3856                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3857                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3858                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3859                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3860                         </actions>
3861                 </permacrud>
3862         </class>
3863
3864         <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">
3865                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3866                         <field name="bucket" reporter:datatype="link"/>
3867                         <field name="id" reporter:datatype="id" />
3868                         <field name="target_call_number" reporter:datatype="link" />
3869                         <field name="create_time" reporter:datatype="timestamp" />
3870                         <field name="pos" reporter:datatype="int" />
3871                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3872                 </fields>
3873                 <links>
3874                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3875                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3876             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3877                 </links>
3878         </class>
3879         <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">
3880                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3881                         <field name="id" reporter:datatype="id" />
3882                         <field name="item" reporter:datatype="link"/>
3883                         <field name="note" reporter:datatype="text" />
3884                 </fields>
3885                 <links>
3886                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3887                 </links>
3888         </class>
3889         <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">
3890                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3891                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3892                         <field name="btype" reporter:datatype="text"/>
3893                         <field name="id" reporter:datatype="id" />
3894                         <field name="name" reporter:datatype="text"/>
3895                         <field name="description" reporter:datatype="text"/>
3896                         <field name="owner" reporter:datatype="link"/>
3897                         <field name="pub" reporter:datatype="bool"/>
3898                         <field name="create_time" reporter:datatype="timestamp" />
3899                 </fields>
3900                 <links>
3901                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3902                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3903                 </links>
3904         </class>
3905         <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">
3906                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3907                         <field name="id" reporter:datatype="id" />
3908                         <field name="bucket" reporter:datatype="link"/>
3909                         <field name="note" reporter:datatype="text" />
3910                 </fields>
3911                 <links>
3912                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3913                 </links>
3914         </class>
3915         <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">
3916                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3917                         <field name="hold" reporter:datatype="link"/>
3918                         <field name="id" reporter:datatype="id" />
3919                         <field name="target_copy" reporter:datatype="link"/>
3920                 </fields>
3921                 <links>
3922                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3923                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3924                 </links>
3925         </class>
3926         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3927                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3928                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3929                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3930                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3931                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3932                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3933                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3934                 </fields>
3935                 <links>
3936                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3937                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3938                 </links>
3939         </class>
3940         <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">
3941                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3942                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3943                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3944                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3945                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3946                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3947                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3948                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3949                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3950                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3951                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3952                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3953                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
3954                 </fields>
3955                 <links>
3956                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3957                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3958                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3959                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3960                 </links>
3961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3962             <actions>
3963                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3964                 <retrieve/>
3965                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3966                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3967             </actions>
3968         </permacrud>
3969         </class>
3970         <class id="acplg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group" oils_persist:tablename="asset.copy_location_group" reporter:label="Copy/Shelving Location Group">
3971                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
3972                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3973                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3974                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3975                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
3976             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3977             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
3978             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3979                 </fields>
3980                 <links>
3981                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3982                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
3983                 </links>
3984         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3985             <actions>
3986                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3987                 <retrieve/>
3988                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3989                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3990             </actions>
3991         </permacrud>
3992         </class>
3993         <class id="acplgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group_map" oils_persist:tablename="asset.copy_location_group_map" reporter:label="Copy/Shelving Location Group Map">
3994                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
3995                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3996             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
3997             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
3998                 </fields>
3999                 <links>
4000                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4001                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4002                 </links>
4003         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4004             <actions>
4005                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4006                                         <context link="lgroup" field="owner" />
4007                 </create>
4008                 <retrieve/>
4009                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4010                                         <context link="lgroup" field="owner" />
4011                 </update>
4012                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4013                                         <context link="lgroup" field="owner" />
4014                 </delete>
4015             </actions>
4016         </permacrud>
4017         </class>
4018
4019     <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">
4020         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4021             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4022             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4023             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4024             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4025         </fields>
4026         <links>
4027             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4028             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4029         </links>
4030         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4031             <actions>
4032                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4033                 <retrieve/>
4034                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4035                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4036             </actions>
4037         </permacrud>
4038     </class>
4039
4040         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4041                 <fields>
4042                         <field name="sre_id" oils_persist:virtual="true" />
4043                         <field name="location" oils_persist:virtual="true" />
4044                         <field name="owning_lib" oils_persist:virtual="true" />
4045                         <field name="basic_holdings" oils_persist:virtual="true" />
4046                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4047                         <field name="supplement_holdings" oils_persist:virtual="true" />
4048                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4049                         <field name="index_holdings" oils_persist:virtual="true" />
4050                         <field name="index_holdings_add" oils_persist:virtual="true" />
4051                         <field name="online" oils_persist:virtual="true" />
4052                         <field name="missing" oils_persist:virtual="true" />
4053                         <field name="incomplete" oils_persist:virtual="true" />
4054                 </fields>
4055         </class>
4056
4057         <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">
4058                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4059                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4060                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4061                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4062                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4063                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4064                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4065                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4066                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4067                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4068                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4069                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4070                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4071                 </fields>
4072                 <links>
4073                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4074                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4075                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4076                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4077                 </links>
4078                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4079                         <actions>
4080                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4081                                 <retrieve/>
4082                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4083                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4084                         </actions>
4085                 </permacrud>
4086         </class>
4087
4088         <class id="scap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">
4089                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4090                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4091                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4092                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4093                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4094                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4095                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4096                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4097                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4098                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4099                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4100                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4101                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4102                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4103                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4104                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4105                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4106                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4107                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4108                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4109                 </fields>
4110                 <links>
4111                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4112                 </links>
4113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4114                         <actions>
4115                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4116                                         <context link="subscription" field="owning_lib" />
4117                                 </create>
4118                                 <retrieve />
4119                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4120                                         <context link="subscription" field="owning_lib" />
4121                                 </update>
4122                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4123                                         <context link="subscription" field="owning_lib" />
4124                                 </delete>
4125                         </actions>
4126                 </permacrud>
4127         </class>
4128
4129         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4130                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4131                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4132                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4133                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4134                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4135                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4136                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4137                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4138                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4139                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4140                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4141                 </fields>
4142                 <links>
4143                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4144                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4145                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4146                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4147                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4148                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4149                 </links>
4150                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4151                         <actions>
4152                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4153                                 <retrieve />
4154                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4155                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4156                         </actions>
4157                 </permacrud>
4158         </class>
4159
4160         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4161                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4162                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4163                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4164                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4165                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4166                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4167                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4168                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4169                 </fields>
4170                 <links>
4171                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4172                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4173                 </links>
4174         </class>
4175
4176         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4177                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4178                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4179                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4180                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4181                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4182                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4183                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4184                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4185                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4186                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4187                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4188                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4189                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4190                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4191                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4192                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4193                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4194                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4195                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4196                 </fields>
4197                 <links>
4198                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4199                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4200                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4201                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4202                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4203                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4204                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4205                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4206                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4207                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4208                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4209                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4210                 </links>
4211                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4212                         <actions>
4213                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4214                                 <retrieve />
4215                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4216                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4217                         </actions>
4218                 </permacrud>
4219         </class>
4220
4221         <class id="sdistn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution_note" oils_persist:tablename="serial.distribution_note" reporter:label="Distribution Note">
4222                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4223                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4224                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4225                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4226                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4227                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4228                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4229                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4230                 </fields>
4231                 <links>
4232                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4233                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4234                 </links>
4235                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4236                         <actions>
4237                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4238                                         <context link="distribution" field="holding_lib" />
4239                                 </create>
4240                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4241                                         <context link="distribution" field="holding_lib" />
4242                                 </retrieve>
4243                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4244                                         <context link="distribution" field="holding_lib" />
4245                                 </update>
4246                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4247                                         <context link="distribution" field="holding_lib" />
4248                                 </delete>
4249                         </actions>
4250                 </permacrud>
4251         </class>
4252
4253         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4254                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4255                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4256                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4257                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4258                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4259                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4260                 </fields>
4261                 <links>
4262                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4263                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4264                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4265                 </links>
4266                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4267                         <actions>
4268                                 <create permission="ADMIN_SERIAL_STREAM">
4269                                         <context link="distribution" field="holding_lib" />
4270                                 </create>
4271                                 <retrieve />
4272                                 <update permission="ADMIN_SERIAL_STREAM">
4273                                         <context link="distribution" field="holding_lib" />
4274                                 </update>
4275                                 <delete permission="ADMIN_SERIAL_STREAM">
4276                                         <context link="distribution" field="holding_lib" />
4277                                 </delete>
4278                         </actions>
4279                 </permacrud>
4280         </class>
4281
4282         <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">
4283                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4284                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4285                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4286                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4287                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4288                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4289                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4290                 </fields>
4291                 <links>
4292                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4293                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4294                 </links>
4295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4296                         <actions>
4297                                 <create permission="ADMIN_SERIAL_STREAM">
4298                                         <context link="stream" jump="distribution" field="holding_lib" />
4299                                 </create>
4300                                 <retrieve permission="RECEIVE_SERIAL">
4301                                         <context link="stream" jump="distribution" field="holding_lib" />
4302                                 </retrieve>
4303                                 <update permission="ADMIN_SERIAL_STREAM">
4304                                         <context link="stream" jump="distribution" field="holding_lib" />
4305                                 </update>
4306                                 <delete permission="ADMIN_SERIAL_STREAM">
4307                                         <context link="stream" jump="distribution" field="holding_lib" />
4308                                 </delete>
4309                         </actions>
4310                 </permacrud>
4311         </class>
4312
4313         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4314                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4315                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4316                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4317                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4318                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4319                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4320                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4321                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4322                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4323                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4324                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4325                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4326                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4327                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4328                 </fields>
4329                 <links>
4330                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4331                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4332                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4333                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4334                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4335                 </links>
4336                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4337                         <actions>
4338                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4339                                         <context link="subscription" field="owning_lib" />
4340                                 </create>
4341                                 <retrieve/>
4342                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4343                                         <context link="subscription" field="owning_lib" />
4344                                 </update>
4345                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4346                                         <context link="subscription" field="owning_lib" />
4347                                 </delete>
4348                         </actions>
4349                 </permacrud>
4350         </class>
4351
4352         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4353                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4354                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4355                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4356                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4357                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4358                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4359                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4360                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4361                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4362                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4363                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4364                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4365                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4366                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4367                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4368                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4369                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4370                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4371                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4372                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4373                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4374                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4375                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4376                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4377                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4378                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4379                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4380                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4381                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4382                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4383                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4384                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4385                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4386                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4387                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4388                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4389                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4390                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4391                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4392                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4393                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4394                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4395                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4396                 </fields>
4397                 <links>
4398                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4399                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4400                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4401                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4402                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4403                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4404                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4405                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4406                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4407                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4408                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4409                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4410                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4411                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4412                 </links>
4413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4414                         <actions>
4415                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4416                                 <retrieve/>
4417                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4418                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4419                         </actions>
4420                 </permacrud>
4421         </class>
4422
4423         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4424                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4425                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4426                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4427                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4428                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4429                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4430                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4431                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4432                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4433                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4434                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4435                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4436                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4437                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4438                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4439                 </fields>
4440                 <links>
4441                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4442                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4443                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4444                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4445                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4446                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4447                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4448                 </links>
4449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4450                         <actions>
4451                                 <create permission="ADMIN_SERIAL_ITEM">
4452                                         <context link="stream" jump="distribution" field="holding_lib" />
4453                                 </create>
4454                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4455                                         <context link="stream" jump="distribution" field="holding_lib" />
4456                                 </retrieve>
4457                                 <update permission="ADMIN_SERIAL_ITEM">
4458                                         <context link="stream" jump="distribution" field="holding_lib" />
4459                                 </update>
4460                                 <delete permission="ADMIN_SERIAL_ITEM">
4461                                         <context link="stream" jump="distribution" field="holding_lib" />
4462                                 </delete>
4463                         </actions>
4464                 </permacrud>
4465         </class>
4466
4467         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4468                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4469                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4470                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4471                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4472                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4473                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4474                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4475                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4476                 </fields>
4477                 <links>
4478                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4479                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4480                 </links>
4481                 <!-- Not available via PCRUD at this time -->
4482         </class>
4483         <class id="sasum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::any_summary" oils_persist:tablename="serial.any_summary" reporter:label="All Issues' Summaries" oils_persist:readonly="true">
4484                 <fields>
4485                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4486                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4487                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4488                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4489                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4490                 </fields>
4491                 <links>
4492                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4493                 </links>
4494         </class>
4495         <class id="smhc" controller="open-ils.cstore" oils_obj:fieldmapper="serial::materialized_holding_code" oils_persist:tablename="serial.materialized_holding_code" reporter:label="Materialized Holding Code" oils_persist:readonly="true">
4496                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4497                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4498                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4499                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4500                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4501                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4502                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4503                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4504                 </fields>
4505                 <links>
4506                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4507                 </links>
4508         </class>
4509         <class id="sbsum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::basic_summary" oils_persist:tablename="serial.basic_summary" reporter:label="Basic Issue Summary">
4510                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4511                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4512                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4513                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4514                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4515                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4516                 </fields>
4517                 <links>
4518                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4519                 </links>
4520                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4521                         <actions>
4522                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4523                                         <context link="distribution" field="holding_lib" />
4524                                 </create>
4525                                 <retrieve/>
4526                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4527                                         <context link="distribution" field="holding_lib" />
4528                                 </update>
4529                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4530                                         <context link="distribution" field="holding_lib" />
4531                                 </delete>
4532                         </actions>
4533                 </permacrud>
4534         </class>
4535
4536         <class id="sssum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::supplement_summary" oils_persist:tablename="serial.supplement_summary" reporter:label="Supplemental Issue Summary">
4537                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4538                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4539                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4540                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4541                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4542                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4543                 </fields>
4544                 <links>
4545                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4546                 </links>
4547                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4548                         <actions>
4549                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4550                                         <context link="distribution" field="holding_lib" />
4551                                 </create>
4552                                 <retrieve/>
4553                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4554                                         <context link="distribution" field="holding_lib" />
4555                                 </update>
4556                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4557                                         <context link="distribution" field="holding_lib" />
4558                                 </delete>
4559                         </actions>
4560                 </permacrud>
4561         </class>
4562
4563         <class id="sisum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Issue Summary">
4564                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4565                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4566                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4567                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4568                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4569                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4570                 </fields>
4571                 <links>
4572                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4573                 </links>
4574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4575                         <actions>
4576                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4577                                         <context link="distribution" field="holding_lib" />
4578                                 </create>
4579                                 <retrieve/>
4580                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4581                                         <context link="distribution" field="holding_lib" />
4582                                 </update>
4583                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4584                                         <context link="distribution" field="holding_lib" />
4585                                 </delete>
4586                         </actions>
4587                 </permacrud>
4588         </class>
4589
4590         <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">
4591                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4592                         <field name="id" reporter:datatype="id" />
4593                         <field name="owning_copy" reporter:datatype="link"/>
4594                         <field name="stat_cat" reporter:datatype="link"/>
4595                         <field name="stat_cat_entry" reporter:datatype="link"/>
4596                 </fields>
4597                 <links>
4598                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4599                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4600                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4601                 </links>
4602         </class>
4603         <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">
4604                 <fields oils_persist:primary="code">
4605                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4606                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4607                 </fields>
4608                 <links/>
4609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4610             <actions>
4611                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4612                 <retrieve/>
4613                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4614                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4615             </actions>
4616         </permacrud>
4617         </class>
4618         <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">
4619                 <fields oils_persist:primary="code">
4620                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4621                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4622                 </fields>
4623                 <links/>
4624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4625             <actions>
4626                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4627                 <retrieve/>
4628                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4629                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4630             </actions>
4631         </permacrud>
4632         </class>
4633         <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">
4634                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4635                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4636                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4637                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4638                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4639                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4640                 </fields>
4641                 <links>
4642             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4643         </links>
4644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4645             <actions>
4646                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4647                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4648                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4649                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4650             </actions>
4651         </permacrud>
4652         </class>
4653         <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">
4654                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4655                         <field name="id" reporter:datatype="id" />
4656                         <field name="name" reporter:datatype="text"/>
4657                 </fields>
4658                 <links/>
4659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4660             <actions>
4661                 <create permission="CREATE_LASSO" global_required="true"/>
4662                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4663                 <update permission="UPDATE_LASSO" global_required="true"/>
4664                 <delete permission="DELETE_LASSO" global_required="true"/>
4665             </actions>
4666         </permacrud>
4667         </class>
4668         <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">
4669                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4670                         <field name="id" reporter:datatype="id" />
4671                         <field name="lasso" reporter:datatype="link"/>
4672                         <field name="org_unit" reporter:datatype="org_unit"/>
4673                 </fields>
4674                 <links>
4675                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4676                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4677                 </links>
4678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4679             <actions>
4680                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4681                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4682                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4683                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4684             </actions>
4685         </permacrud>
4686         </class>
4687         <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">
4688                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4689                         <field name="id" reporter:datatype="id" />
4690                         <field name="from_org" reporter:datatype="org_unit"/>
4691                         <field name="to_org" reporter:datatype="org_unit"/>
4692                         <field name="prox" reporter:datatype="int" />
4693                 </fields>
4694                 <links>
4695                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4696                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4697                 </links>
4698         </class>
4699         <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">
4700                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4701                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4702                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4703                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4704                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4705                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4706                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4707                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4708                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4709                 </fields>
4710                 <links/>
4711         </class>
4712         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4713                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4714                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4715                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4716                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4717                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4718                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4719                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4720                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4721                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4722                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4723                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4724                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4725                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4726                 </fields>
4727                 <links>
4728                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4729                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4730                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4731                 </links>
4732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4733             <actions>
4734                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4735                 <retrieve/>
4736                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4737                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4738             </actions>
4739         </permacrud>
4740         </class>
4741         <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">
4742                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4743                         <field name="address_type"  reporter:datatype="text"/>
4744                         <field name="city"  reporter:datatype="text"/>
4745                         <field name="country"  reporter:datatype="text"/>
4746                         <field name="county"  reporter:datatype="text"/>
4747                         <field name="id" reporter:datatype="id" />
4748                         <field name="org_unit" reporter:datatype="org_unit"/>
4749                         <field name="post_code"  reporter:datatype="text"/>
4750                         <field name="state"  reporter:datatype="text"/>
4751                         <field name="street1"  reporter:datatype="text"/>
4752                         <field name="street2"  reporter:datatype="text"/>
4753                         <field name="valid" reporter:datatype="bool"/>
4754                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4755                 </fields>
4756                 <links>
4757                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4758                 </links>
4759         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4760             <actions>
4761                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4762                 <retrieve/>
4763                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4764                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4765             </actions>
4766         </permacrud>
4767         </class>
4768         <!-- A note: Please update alhr when updating ahr -->
4769         <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">
4770                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4771                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4772                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4773                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4774                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4775                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4776                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4777                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4778                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4779                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4780                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4781                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4782                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4783                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4784                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
4785                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="text"/>
4786                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4787                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4788                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4789                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4790                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4791                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4792                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4793                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4794                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4795                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4796                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4797                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4798                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4799                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4800                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4801                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4802                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4803                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4804                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4805                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4806                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4807                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4808                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4809                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4810                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4811                 </fields>
4812                 <links>
4813                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4814                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4815                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4816                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4817                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4818                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4819                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4820                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4821                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4822                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4823                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4824                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4825                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4826                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4827                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4828                         <link field="sms_carrier" reltype="might_have" key="code" map="" class="csc"/>
4829                 </links>
4830         </class>
4831         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
4832                 <oils_persist:source_definition>
4833                         SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL GROUP BY current_copy)x USING (current_copy, capture_time)
4834                 </oils_persist:source_definition>
4835                 <fields oils_persist:primary="id">
4836                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4837                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4838                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4839                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4840                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4841                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4842                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4843                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4844                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4845                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4846                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4847                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4848                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4849                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4850                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4851                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4852                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4853                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4854                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4855                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4856                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4857                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4858                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4859                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4860                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4861                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4862                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4863                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4864                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4865                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4866                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4867                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4868                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4869                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4870                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4871                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4872                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4873                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4874                 </fields>
4875                 <links>
4876                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4877                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4878                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4879                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4880                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4881                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4882                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4883                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4884                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4885                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4886                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4887                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4888                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4889                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4890                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4891                 </links>
4892         </class>
4893
4894         <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">
4895                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4896                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4897                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4898                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4899                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4900                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4901                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4902                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4903                 </fields>
4904                 <links>
4905                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4906                 </links>
4907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4908                         <actions>
4909                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4910                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4911                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4912                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4913                         </actions>
4914                 </permacrud>
4915         </class>
4916         <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">
4917                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4918                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4919                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4920                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4921                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4922                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4923                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4924                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4925                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4926                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4927                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4928                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4929                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4930                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4931                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4932                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4933                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4934                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4935                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4936                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4937                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4938                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4939                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4940                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4941                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4942                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4943                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4944                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4945                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4946                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4947                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4948                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4949                 </fields>
4950                 <links>
4951                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4952                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4953                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4954                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4955                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4956                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4957                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4958                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4959                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4960                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4961                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4962                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4963                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4964                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4965                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4966                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4967                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4968                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4969                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4970                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4971                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4972                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4973                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4974                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4975                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4976                 </links>
4977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4978             <actions>
4979                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4980                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4981                     <context field="id"/>
4982                     <context field="parent_ou"/>
4983                                 </retrieve>
4984                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4985                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4986             </actions>
4987         </permacrud>
4988         </class>
4989         <class id="aouct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree" oils_persist:tablename="actor.org_unit_custom_tree" reporter:label="Org Unit Custom Tree">
4990                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
4991                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4992                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4993                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
4994                 </fields>
4995                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4996                         <actions>
4997                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
4998                                 <retrieve/>
4999                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5000                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5001                         </actions>
5002                 </permacrud>
5003         </class>
5004         <class id="aouctn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree_node" oils_persist:tablename="actor.org_unit_custom_tree_node" reporter:label="Org Unit Custom Tree Node">
5005                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5006                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5007                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5008                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5009                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5010                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5011                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5012                 </fields>
5013                 <links>
5014                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5015                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5016                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5017                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5018                 </links>
5019                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5020                         <actions>
5021                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5022                                 <retrieve/>
5023                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5024                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5025                         </actions>
5026                 </permacrud>
5027         </class>
5028         <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">
5029                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5030                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5031                         <field name="btype" reporter:datatype="text"/>
5032                         <field name="id" reporter:datatype="id" />
5033                         <field name="name"  reporter:datatype="text"/>
5034                         <field name="description" reporter:datatype="text"/>
5035                         <field name="owner" reporter:datatype="link"/>
5036                         <field name="pub" reporter:datatype="bool"/>
5037                         <field name="create_time" reporter:datatype="timestamp" />
5038                 </fields>
5039                 <links>
5040                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5041                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5042                 </links>
5043         </class>
5044         <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">
5045                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5046                         <field name="id" reporter:datatype="id" />
5047                         <field name="bucket" reporter:datatype="link"/>
5048                         <field name="note" reporter:datatype="text" />
5049                 </fields>
5050                 <links>
5051                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5052                 </links>
5053         </class>
5054         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5055                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5056                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5057                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5058                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5059                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5060                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5061                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5062                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5063                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5064                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5065                 </fields>
5066                 <links>
5067                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5068                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5069                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5070                 </links>
5071         </class>
5072         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5073                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5074                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5075                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5076                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5077                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5078                 </fields>
5079                 <links>
5080                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5081                 </links>
5082         </class>
5083     <class id="actscsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat_sip_fields" oils_persist:tablename="actor.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
5084         <fields oils_persist:primary="field">
5085             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5086             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5087             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5088         </fields>
5089         <links/>
5090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5091             <actions>
5092                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5093                 <retrieve />
5094                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5095                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5096             </actions>
5097         </permacrud>
5098     </class>
5099         <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">
5100                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5101                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5102                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5103                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5104                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5105                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5106                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5107                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5108                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5109                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5110                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5111                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5112                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5113                 </fields>
5114                 <links>
5115                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5116                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5117                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5118                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5119                 </links>
5120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5121             <actions>
5122                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5123                 <retrieve />
5124                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5125                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5126             </actions>
5127         </permacrud>
5128         </class>
5129         <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">
5130                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5131                         <field name="field" reporter:datatype="link"/>
5132                         <field name="id" reporter:datatype="id" />
5133                         <field name="source" reporter:datatype="link"/>
5134                         <field name="value"  reporter:datatype="text"/>
5135                 </fields>
5136                 <links>
5137                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5138                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5139                 </links>
5140         </class>
5141         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5142                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5143                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5144                         <field name="btype" reporter:datatype="text"/>
5145                         <field name="id" reporter:datatype="id" />
5146                         <field name="name"  reporter:datatype="text"/>
5147                         <field name="description" reporter:datatype="text"/>
5148                         <field name="owner" reporter:datatype="link"/>
5149                         <field name="pub" reporter:datatype="bool"/>
5150                         <field name="create_time" reporter:datatype="timestamp" />
5151                 </fields>
5152                 <links>
5153                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5154                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5155                 </links>
5156         </class>
5157         <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">
5158                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5159                         <field name="id" reporter:datatype="id" />
5160                         <field name="bucket" reporter:datatype="link"/>
5161                         <field name="note" reporter:datatype="text" />
5162                 </fields>
5163                 <links>
5164                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5165                 </links>
5166         </class>
5167         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5168                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5169                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5170                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5171                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5172                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5173                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5174                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5175                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5176                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5177                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5178                 </fields>
5179                 <links>
5180                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5181                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5182                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5183                 </links>
5184         </class>
5185         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5186                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5187                         <field name="id" reporter:datatype="id" />
5188                         <field name="ind1" />
5189                         <field name="ind2" />
5190                         <field name="record" />
5191                         <field name="subfield" />
5192                         <field name="tag" />
5193                         <field name="value" />
5194                 </fields>
5195                 <links>
5196                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5197                 </links>
5198         </class>
5199         <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">
5200                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5201                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5202                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5203                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5204                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5205                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5206                 </fields>
5207                 <links>
5208                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5209                 </links>
5210         </class>
5211         <class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type" oils_persist:field_safe="true">
5212                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5213                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5214                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5215                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5216                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5217                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5218                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5219                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5220                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5221                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5222                 </fields>
5223                 <links>
5224                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5225                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5226                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5227                 </links>
5228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5229             <actions>
5230                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5231                 <retrieve/>
5232                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5233                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5234             </actions>
5235         </permacrud>
5236         </class>
5237         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5238                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5239                         <field name="create_date" reporter:datatype="timestamp"/>
5240                         <field name="creator" reporter:datatype="link"/>
5241                         <field name="edit_date" reporter:datatype="timestamp"/>
5242                         <field name="editor" reporter:datatype="link"/>
5243                         <field name="id" reporter:datatype="id" />
5244                         <field name="pub" reporter:datatype="bool"/>
5245                         <field name="record" reporter:datatype="link"/>
5246                         <field name="value"  reporter:datatype="text"/>
5247                 </fields>
5248                 <links>
5249                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5250                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5251                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5252                 </links>
5253         </class>
5254         <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">
5255                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5256                         <field name="balance_owed" reporter:datatype="money" />
5257                         <field name="total_owed" reporter:datatype="money" />
5258                         <field name="total_paid" reporter:datatype="money" />
5259                         <field name="usr" reporter:datatype="link"/>
5260                 </fields>
5261                 <links>
5262                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5263                 </links>
5264         </class>
5265         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5266                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5267                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5268                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5269                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5270                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5271                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5272                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5273                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5274                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5275                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5276                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5277                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5278                 </fields>
5279                 <links>
5280                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5281                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5282                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5283                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5284                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5285                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5286                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5287                 </links>
5288         </class>
5289         <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">
5290                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5291                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5292                         <field name="quality" reporter:datatype="int" />
5293                         <field name="source" reporter:datatype="text"/>
5294                         <field name="transcendant" reporter:datatype="bool"/>
5295                         <field name="can_have_copies" reporter:datatype="bool"/>
5296                 </fields>
5297                 <links/>
5298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5299             <actions>
5300                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5301                 <retrieve/>
5302                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5303                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5304             </actions>
5305         </permacrud>
5306         </class>
5307         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5308                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5309                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5310                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5311                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5312                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5313                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5314                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5315                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5316                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5317                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5318                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5319                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5320                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5321                 </fields>
5322                 <links>
5323                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5324                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5325                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5326                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5327                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5328                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5329                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5330                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5331                 </links>
5332         </class>
5333         <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">
5334                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5335                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5336                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5337                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5338                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5339                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5340                 </fields>
5341                 <links>
5342                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5343                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5344                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5345                 </links>
5346         </class>
5347         <class id="actsced" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_default" oils_persist:tablename="actor.stat_cat_entry_default" reporter:label="User Stat Cat Default Entry">
5348                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5349                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5350                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5351                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5352                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5353                 </fields>
5354                 <links>
5355                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5356                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5357                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5358                 </links>
5359         </class>
5360         <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">
5361                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5362                         <field name="bucket" reporter:datatype="link"/>
5363                         <field name="id" reporter:datatype="id" />
5364                         <field name="target_user" reporter:datatype="link"/>
5365                         <field name="create_time" reporter:datatype="timestamp" />
5366                         <field name="pos" reporter:datatype="int" />
5367                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5368                 </fields>
5369                 <links>
5370                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5371                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5372             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5373                 </links>
5374         </class>
5375         <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">
5376                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5377                         <field name="id" reporter:datatype="id" />
5378                         <field name="item" reporter:datatype="link"/>
5379                         <field name="note" reporter:datatype="text" />
5380                 </fields>
5381                 <links>
5382                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5383                 </links>
5384         </class>
5385         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5386                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5387                         <field name="balance_owed" reporter:datatype="money" />
5388                         <field name="total_owed" reporter:datatype="money" />
5389                         <field name="total_paid" reporter:datatype="money" />
5390                         <field name="usr" reporter:datatype="link"/>
5391                 </fields>
5392                 <links>
5393                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5394                 </links>
5395         </class>
5396         <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">
5397                 <fields oils_persist:primary="code" oils_persist:sequence="">
5398                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5399                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5400                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5401                 </fields>
5402                 <links/>
5403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5404             <actions>
5405                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5406                 <retrieve/>
5407                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5408                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5409             </actions>
5410         </permacrud>
5411         </class>
5412         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5413                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5414                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5415                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5416                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5417                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5418                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5419                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5420                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5421                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5422                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5423                 </fields>
5424                 <links>
5425                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5426                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5427                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5428                 </links>
5429         </class>
5430         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5431                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5432                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5433                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5434                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5435                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5436                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5437                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5438                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5439                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5440                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5441                 </fields>
5442                 <links>
5443                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5444                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5445                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5446                 </links>
5447         </class>
5448         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5449                 <fields oils_persist:primary="id" oils_persist:sequence="">
5450                         <field name="checkin_lib" reporter:datatype="link"/>
5451                         <field name="checkin_staff" reporter:datatype="link"/>
5452                         <field name="checkin_time" reporter:datatype="timestamp"/>
5453                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5454                         <field name="circ_staff" reporter:datatype="link"/>
5455                         <field name="desk_renewal" reporter:datatype="bool"/>
5456                         <field name="due_date" reporter:datatype="timestamp"/>
5457                         <field name="duration" reporter:datatype="interval"/>
5458                         <field name="duration_rule" reporter:datatype="link"/>
5459                         <field name="fine_interval" reporter:datatype="interval"/>
5460                         <field name="id" reporter:datatype="id" />
5461                         <field name="max_fine" reporter:datatype="money" />
5462                         <field name="max_fine_rule" reporter:datatype="link"/>
5463                         <field name="opac_renewal" reporter:datatype="bool"/>
5464                         <field name="phone_renewal" reporter:datatype="bool"/>
5465                         <field name="recurring_fine" reporter:datatype="money" />
5466                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5467                         <field name="renewal_remaining" reporter:datatype="int" />
5468             <field name="grace_period" reporter:datatype="interval" />
5469                         <field name="stop_fines" reporter:datatype="text"/>
5470                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5471                         <field name="target_copy" reporter:datatype="link"/>
5472                         <field name="usr" reporter:datatype="link"/>
5473                         <field name="xact_finish" reporter:datatype="timestamp" />
5474                         <field name="xact_start" reporter:datatype="timestamp" />
5475                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5476                 </fields>
5477                 <links>
5478                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5479                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5480                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5481                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5482                 </links>
5483         </class>
5484         <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">
5485                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5486                         <field name="field" reporter:datatype="link"/>
5487                         <field name="id" reporter:datatype="id" />
5488                         <field name="source" reporter:datatype="link"/>
5489                         <field name="value" reporter:datatype="text"/>
5490                 </fields>
5491                 <links>
5492                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5493                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5494                 </links>
5495         </class>
5496         <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">
5497                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5498                         <field name="high" reporter:datatype="money" />
5499                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5500                         <field name="low" reporter:datatype="money" />
5501                         <field name="name" reporter:datatype="text"/>
5502                         <field name="normal" reporter:datatype="money" />
5503                         <field name="recurrence_interval" reporter:datatype="interval"/>
5504             <field name="grace_period" reporter:datatype="interval" />
5505                 </fields>
5506                 <links/>
5507         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5508             <actions>
5509                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5510                 <retrieve/>
5511                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5512                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5513             </actions>
5514         </permacrud>
5515         </class>
5516         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5517                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5518                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5519                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5520                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5521                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5522                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5523                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5524                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5525                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5526                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5527                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5528                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5529                 </fields>
5530                 <links>
5531                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5532                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5533                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5534                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5535                 </links>
5536         </class>
5537         <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">
5538                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5539                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5540                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5541                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5542                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5543                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5544                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5545                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5546                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5547                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5548                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5549                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5550                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5551                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5552                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5553                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5554                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5555                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5556                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5557                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5558                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5559                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5560                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5561                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5562                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5563                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5564                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5565                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5566                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5567                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5568                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5569                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5570                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5571                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5572                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5573                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5574                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5575                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5576                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5577                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5578                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5579                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5580                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5581                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5582                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5583                 </fields>
5584                 <links>
5585                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5586                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5587                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5588                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5589                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5590                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5591                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5592                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5593                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5594                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5595                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5596                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5597                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5598                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5599                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5600                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5601                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5602                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5603                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5604                 </links>
5605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5606             <actions>
5607                 <create permission="CREATE_COPY">
5608                     <context link="call_number" field="owning_lib"/>
5609                 </create>
5610                 <retrieve/>
5611                 <update permission="UPDATE_COPY">
5612                     <context link="call_number" field="owning_lib"/>
5613                 </update>
5614                 <delete permission="DELETE_COPY">
5615                     <context link="call_number" field="owning_lib"/>
5616                 </delete>
5617             </actions>
5618         </permacrud>
5619         </class>
5620
5621         <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">
5622                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5623                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5624                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5625                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5626                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5627                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5628                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5629                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5630                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5631                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5632                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5633                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5634                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5635                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5636                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5637                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5638                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5639                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5640                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5641                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5642                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5643                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5644                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5645                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5646                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5647                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5648                 </fields>
5649                 <links>
5650                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5651                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5652                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5653                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5654                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5655                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5656                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5657                 </links>
5658                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5659                         <actions>
5660                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5661                                 <retrieve />
5662                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5663                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5664                         </actions>
5665                 </permacrud>
5666         </class>
5667
5668         <class id="crahp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::age_hold_protect" oils_persist:tablename="config.rule_age_hold_protect" reporter:label="Age Hold Protection Rule" oils_persist:field_safe="true">
5669                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5670                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5671                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5672                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5673                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5674                 </fields>
5675                 <links/>
5676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5677             <actions>
5678                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5679                 <retrieve/>
5680                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5681                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5682             </actions>
5683         </permacrud>
5684         </class>
5685         <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">
5686                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5687                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5688                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5689                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5690                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5691                 </fields>
5692                 <links/>
5693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5694             <actions>
5695                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5696                 <retrieve/>
5697                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5698                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5699             </actions>
5700         </permacrud>
5701         </class>
5702         <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">
5703                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5704                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5705                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5706                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5707                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5708                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5709                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5710                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5711                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5712                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5713                 </fields>
5714                 <links>
5715                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5716                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5717                 </links>
5718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5719             <actions>
5720                 <create permission="CREATE_PERM" global_required="true"/>
5721                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5722                 <update permission="UPDATE_PERM" global_required="true"/>
5723                 <delete permission="DELETE_PERM" global_required="true"/>
5724             </actions>
5725         </permacrud>
5726         </class>
5727         <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">
5728                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5729                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5730                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5731                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5732                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5733                 </fields>
5734                 <links>
5735                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5736                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5737                 </links>
5738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5739             <actions>
5740                 <create permission="ADMIN_SURVEY">
5741                     <context link="question" jump="survey" field="owner"/>
5742                 </create>
5743                 <retrieve/>
5744                 <update permission="ADMIN_SURVEY">
5745                     <context link="question" jump="survey" field="owner"/>
5746                 </update>
5747                 <delete permission="ADMIN_SURVEY">
5748                     <context link="question" jump="survey" field="owner"/>
5749                 </delete>
5750             </actions>
5751         </permacrud>
5752         </class>
5753         <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">
5754                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5755                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5756                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5757                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5758                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5759                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5760                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5761                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5762                 </fields>
5763                 <links>
5764                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5765                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5766                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5767                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5768                 </links>
5769         </class>
5770         <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">
5771                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5772                         <field name="balance_owed" reporter:datatype="money" />
5773                         <field name="total_owed" reporter:datatype="money" />
5774                         <field name="total_paid" reporter:datatype="money" />
5775                         <field name="usr" reporter:datatype="link"/>
5776                 </fields>
5777                 <links>
5778                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5779                 </links>
5780         </class>
5781         <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">
5782                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5783                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5784                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5785                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5786                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5787                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5788                 </fields>
5789                 <links>
5790                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5791                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5792                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5793                 </links>
5794         </class>
5795         <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">
5796                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5797                         <field name="field" reporter:datatype="link"/>
5798                         <field name="id" reporter:datatype="id" />
5799                         <field name="source" reporter:datatype="link"/>
5800                         <field name="value" reporter:datatype="text"/>
5801                 </fields>
5802                 <links>
5803                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5804                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5805                 </links>
5806         </class>
5807         <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">
5808                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5809                         <field name="field" reporter:datatype="link"/>
5810                         <field name="id" reporter:datatype="id" />
5811                         <field name="source" reporter:datatype="link"/>
5812                         <field name="value" reporter:datatype="text"/>
5813                 </fields>
5814                 <links>
5815                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5816                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5817                 </links>
5818         </class>
5819         <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">
5820                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5821                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5822                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5823                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5824                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5825                 </fields>
5826                 <links>
5827                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5828                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5829                 </links>
5830         </class>
5831         <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">
5832                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5833                         <field name="depth" reporter:datatype="int" />
5834                         <field name="grantable" reporter:datatype="bool"/>
5835                         <field name="grp" reporter:datatype="link"/>
5836                         <field name="id" reporter:datatype="id" />
5837                         <field name="perm" reporter:datatype="link"/>
5838                 </fields>
5839                 <links>
5840                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5841                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5842                 </links>
5843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5844             <actions>
5845                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5846                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5847                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5848                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5849             </actions>
5850         </permacrud>
5851         </class>
5852         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5853                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5854                         <field name="items" oils_persist:virtual="true" />
5855                         <field name="btype" reporter:datatype="text"/>
5856                         <field name="id" reporter:datatype="id" />
5857                         <field name="name" reporter:datatype="text"/>
5858                         <field name="description" reporter:datatype="text"/>
5859                         <field name="owner" reporter:datatype="link"/>
5860                         <field name="pub" reporter:datatype="bool"/>
5861                         <field name="create_time" reporter:datatype="timestamp" />
5862                 </fields>
5863                 <links>
5864                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5865                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5866                 </links>
5867         </class>
5868         <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">
5869                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5870                         <field name="id" reporter:datatype="id" />
5871                         <field name="bucket" reporter:datatype="link"/>
5872                         <field name="note" reporter:datatype="text" />
5873                 </fields>
5874                 <links>
5875                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5876                 </links>
5877         </class>
5878         <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">
5879                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5880                         <field name="id" reporter:datatype="int" />
5881                         <field name="usr" reporter:datatype="link"/>
5882                         <field name="work_ou" reporter:datatype="link"/>
5883                 </fields>
5884                 <links>
5885                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5886                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5887                 </links>
5888         </class>
5889         <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">
5890                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5891                         <field name="depth" reporter:datatype="int"/>
5892                         <field name="grantable" reporter:datatype="bool"/>
5893                         <field name="id" reporter:datatype="id" />
5894                         <field name="perm" reporter:datatype="link"/>
5895                         <field name="usr" reporter:datatype="link"/>
5896                 </fields>
5897                 <links>
5898                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5899                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5900                 </links>
5901         </class>
5902         <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">
5903                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5904                         <field name="object_id" reporter:datatype="text"/>
5905                         <field name="grantable" reporter:datatype="bool"/>
5906                         <field name="id" reporter:datatype="id" />
5907                         <field name="perm" reporter:datatype="link"/>
5908                         <field name="usr" reporter:datatype="link"/>
5909                         <field name="object_type" reporter:datatype="text"/>
5910                 </fields>
5911                 <links>
5912                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5913                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5914                 </links>
5915         </class>
5916         <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">
5917                 <fields oils_persist:primary="id" oils_persist:sequence="">
5918                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5919                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5920                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5921                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5922                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5923                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5924                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5925                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5926                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5927                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5928                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5929                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5930                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5931                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5932                 </fields>
5933                 <links>
5934                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5935                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5936                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5937                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5938                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5939                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5940                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5941                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5942                 </links>
5943         </class>
5944         <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">
5945                 <fields oils_persist:primary="id" oils_persist:sequence="">
5946                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5947                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5948                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5949                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5950                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5951                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5952                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5953                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5954                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5955                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5956                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5957                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5958                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5959                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5960                 </fields>
5961                 <links>
5962                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5963                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5964                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5965                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5966                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5967                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5968                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5969                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5970                 </links>
5971         </class>
5972         <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">
5973                 <fields oils_persist:primary="id" oils_persist:sequence="">
5974                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5975                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5976                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5977                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5978                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5979                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5980                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5981                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5982                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5983                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5984                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5985                 </fields>
5986                 <links>
5987                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5988                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5989                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5990                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5991                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5992                 </links>
5993         </class>
5994         <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">
5995                 <fields oils_persist:primary="id" oils_persist:sequence="">
5996                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5997                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5998                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5999                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6000                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6001                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6002                         <field reporter:label="Accepting User" name="accepting_usr" />
6003                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6004                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6005                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6006                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6007                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6008                 </fields>
6009                 <links>
6010                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6011                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6012                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6013                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6014                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6015                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6016                 </links>
6017         </class>
6018         <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">
6019                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6020                         <field name="bucket" reporter:datatype="link"/>
6021                         <field name="id" reporter:datatype="id" />
6022                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6023                         <field name="create_time" reporter:datatype="timestamp" />
6024                         <field name="pos" reporter:datatype="int" />
6025                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6026                 </fields>
6027                 <links>
6028                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6029                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6030             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6031                 </links>
6032         </class>
6033         <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">
6034                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6035                         <field name="id" reporter:datatype="id" />
6036                         <field name="item" reporter:datatype="link"/>
6037                         <field name="note" reporter:datatype="text" />
6038                 </fields>
6039                 <links>
6040                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6041                 </links>
6042         </class>
6043         <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">
6044                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6045                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6046                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6047                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6048                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6049                 </fields>
6050                 <links>
6051                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6052                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6053                 </links>
6054         </class>
6055     <class id="ascsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_sip_fields" oils_persist:tablename="asset.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
6056         <fields oils_persist:primary="field">
6057             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6058             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6059             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6060         </fields>
6061         <links/>
6062         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6063             <actions>
6064                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6065                 <retrieve />
6066                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6067                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6068             </actions>
6069         </permacrud>
6070     </class>
6071         <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">
6072                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6073                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6074                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6075                 </fields>
6076                 <links/>
6077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6078             <actions>
6079                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6080                 <retrieve/>
6081                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6082                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6083             </actions>
6084         </permacrud>
6085         </class>
6086
6087
6088         <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">
6089                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6090                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6091                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6092                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6093                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6094                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6095                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6096                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6097                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6098                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6099                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6100                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6101                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6102                 </fields>
6103                 <links>
6104                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6105                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6106                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6107                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6108                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6109                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6110                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6111                 </links>
6112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6113             <actions>
6114                 <create permission="TRANSIT_COPY">
6115                     <context link="target_copy" field="owner"/>
6116                 </create>
6117                 <retrieve/>
6118                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6119                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6120             </actions>
6121         </permacrud>
6122         </class>
6123         <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">
6124                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6125                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6126                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6127                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6128                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6129                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6130                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6131                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6132                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6133                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6134                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6135                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6136                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6137                 </fields>
6138                 <links>
6139                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6140                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6141                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6142                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6143                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6144                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6145                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6146                 </links>
6147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6148             <actions>
6149                 <create permission="TRANSIT_COPY" context_field="owner">
6150                     <context link="target_copy" field="circ_lib"/>
6151                 </create>
6152                 <retrieve/>
6153                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6154                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6155             </actions>
6156         </permacrud>
6157         </class>
6158         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6159                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6160                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6161                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6162                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6163                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6164                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6165                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6166                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6167                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6168                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6169                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6170                 </fields>
6171                 <links>
6172                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6173                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6174                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6175                 </links>
6176         </class>
6177         <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">
6178                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6179                         <field name="grp" />
6180                         <field name="id" reporter:datatype="id" />
6181                         <field name="usr" />
6182                 </fields>
6183                 <links>
6184                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6185                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6186                 </links>
6187         </class>
6188         <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">
6189                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6190                         <field name="id" reporter:datatype="id" />
6191                         <field name="fq_field" reporter:datatype="text"/>
6192                         <field name="identity_value" reporter:datatype="text"/>
6193                         <field name="translation" reporter:datatype="text"/>
6194                         <field name="string" reporter:datatype="text"/>
6195                 </fields>
6196                 <links>
6197                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6198                 </links>
6199         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6200             <actions>
6201                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6202                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6203                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6204                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6205             </actions>
6206         </permacrud>
6207         </class>
6208         <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">
6209                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6210                         <field name="id" reporter:datatype="id" />
6211                         <field name="fm_class" reporter:datatype="text"/>
6212                         <field name="field" reporter:datatype="text"/>
6213                         <field name="owner" reporter:datatype="org_unit"/>
6214                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6215                 </fields>
6216                 <links>
6217                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6218                 </links>
6219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6220             <actions>
6221                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6222                 <retrieve/>
6223                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6224                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6225             </actions>
6226         </permacrud>
6227         </class>
6228         <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">
6229                 <fields oils_persist:primary="code">
6230                         <field name="code" reporter:datatype="id" />
6231                         <field name="marc_code" reporter:datatype="text"/>
6232                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6233                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6234                 </fields>
6235                 <links/>
6236         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6237             <actions>
6238                 <create permission="CREATE_LOCALE" global_required="true"/>
6239                 <retrieve/>
6240                 <update permission="UPDATE_LOCALE" global_required="true"/>
6241                 <delete permission="DELETE_LOCALE" global_required="true"/>
6242             </actions>
6243         </permacrud>
6244         </class>
6245         <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">
6246                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6247                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6248                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6249                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6250             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6251                 </fields>
6252                 <links>
6253                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6254                 </links>
6255         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6256             <actions>
6257                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6258                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6259                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6260                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6261             </actions>
6262         </permacrud>
6263         </class>
6264
6265         <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">
6266                 <fields oils_persist:primary="id">
6267                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6268                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6269                 </fields>
6270                 <links/>
6271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6272             <actions>
6273                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6274                 <retrieve/>
6275                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6276                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6277             </actions>
6278         </permacrud>
6279         </class>
6280
6281         <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">
6282                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6283                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6284                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6285                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6286                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6287                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6288                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6289                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6290                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6291                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6292                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6293                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6294                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6295                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6296                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6297                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6298                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6299                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6300                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6301                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6302                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6303                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6304                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6305                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6306                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6307                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6308                 </fields>
6309                 <links>
6310                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6311                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6312                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6313                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6314                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6315                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6316                 </links>
6317         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6318             <actions>
6319                 <create permission="user_request.create">
6320                     <context link="usr" field="home_ou"/>
6321                                 </create>
6322                 <retrieve permission="user_request.view">
6323                     <context link="usr" field="home_ou"/>
6324                                 </retrieve>
6325                 <update permission="user_request.update">
6326                     <context link="usr" field="home_ou"/>
6327                                 </update>
6328                 <delete permission="user_request.delete">
6329                     <context link="usr" field="home_ou"/>
6330                                 </delete>
6331             </actions>
6332         </permacrud>
6333         </class>
6334
6335         <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">
6336                 <fields oils_persist:primary="code">
6337                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6338                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6339                 </fields>
6340                 <links/>
6341         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6342             <actions>
6343                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6344                 <retrieve/>
6345                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6346                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6347             </actions>
6348         </permacrud>
6349         </class>
6350
6351         <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">
6352                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6353                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6354                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6355                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6356                         <field reporter:label="Ratio" name="ratio" />
6357                 </fields>
6358                 <links>
6359                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6360                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6361                 </links>
6362                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6363                         <actions>
6364                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6365                                 <retrieve/>
6366                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6367                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6368                         </actions>
6369                 </permacrud>
6370         </class>
6371
6372         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6373                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6374                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6375                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6376                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6377                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6378                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6379                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6380                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6381                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6382                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6383                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6384                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6385                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6386                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6387                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6388                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6389                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6390                 </fields>
6391                 <links>
6392                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6393                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6394             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6395             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6396             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6397                 </links>
6398         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6399             <actions>
6400                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6401                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6402                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6403                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6404             </actions>
6405         </permacrud>
6406         </class>
6407
6408         <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">
6409                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6410                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6411                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6412                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6413                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6414                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6415                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6416                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6417                 </fields>
6418                 <links>
6419                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6420                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6421                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6422                 </links>
6423         </class>
6424
6425         <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">
6426                 <fields oils_persist:primary="code">
6427                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6428                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6429                 </fields>
6430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6431             <actions>
6432                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6433                 <retrieve/>
6434                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6435                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6436             </actions>
6437                 </permacrud>
6438         </class>
6439
6440         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6441                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6442                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6443                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6444                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6445                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6446                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6447                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6448                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6449                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6450                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6451                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6452                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6453                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6454                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6455                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6456                 </fields>
6457                 <links>
6458                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6459                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6460                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6461                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6462                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6463                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6464                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6465                 </links>
6466         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6467             <actions>
6468                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6469                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6470                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6471                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6472             </actions>
6473         </permacrud>
6474         </class>
6475
6476         <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">
6477                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6478                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6479                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6480                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6481                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6482                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6483                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6484                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6485                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6486                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6487                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6488                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6489                 </fields>
6490                 <links>
6491                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6492                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6493                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6494                 </links>
6495         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6496             <actions>
6497                 <create   permission="ADMIN_INVOICE">
6498                                         <context link="invoice" field="receiver"/>
6499                                 </create>
6500                 <retrieve permission="ADMIN_INVOICE">
6501                                         <context link="invoice" field="receiver"/>
6502                                 </retrieve>
6503                 <update   permission="ADMIN_INVOICE">
6504                                         <context link="invoice" field="receiver"/>
6505                                 </update>
6506                                 <delete   permission="ADMIN_INVOICE">
6507                                         <context link="invoice" field="receiver"/>
6508                                 </delete>
6509             </actions>
6510         </permacrud>
6511         </class>
6512
6513         <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">
6514                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6515                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6516                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6517                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6518                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6519                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6520                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6521                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6522                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6523                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6524                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6525                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6526                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6527                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6528                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6529                 </fields>
6530                 <links>
6531                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6532                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6533                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6534                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6535                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6536                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6537                 </links>
6538         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6539             <actions>
6540                 <create   permission="ADMIN_INVOICE">
6541                                         <context link="invoice" field="receiver"/>
6542                                 </create>
6543                 <retrieve permission="ADMIN_INVOICE">
6544                                         <context link="invoice" field="receiver"/>
6545                                 </retrieve>
6546                 <update   permission="ADMIN_INVOICE">
6547                                         <context link="invoice" field="receiver"/>
6548                                 </update>
6549                                 <delete   permission="ADMIN_INVOICE">
6550                                         <context link="invoice" field="receiver"/>
6551                                 </delete>
6552             </actions>
6553         </permacrud>
6554         </class>
6555
6556         <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">
6557                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6558                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6559                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6560                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6561                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6562                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6563                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6564                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6565                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6566                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6567                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6568                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6569                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6570                 </fields>
6571                 <links>
6572                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6573                 </links>
6574         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6575             <actions>
6576                 <create permission="ADMIN_PROVIDER">
6577                     <context link="provider" field="owner"/>
6578                 </create>
6579                 <retrieve permission="ADMIN_PROVIDER">
6580                     <context link="provider" field="owner"/>
6581                 </retrieve>
6582                 <update permission="ADMIN_PROVIDER">
6583                     <context link="provider" field="owner"/>
6584                 </update>
6585                 <delete permission="ADMIN_PROVIDER">
6586                     <context link="provider" field="owner"/>
6587                 </delete>
6588             </actions>
6589         </permacrud>
6590         </class>
6591
6592         <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">
6593                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6594                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6595                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6596                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6597                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6598                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6599                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6600         </fields>
6601                 <links>
6602                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6603                 </links>
6604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6605             <actions>
6606                 <create permission="ADMIN_PROVIDER">
6607                     <context link="provider" field="owner"/>
6608                 </create>
6609                 <retrieve permission="ADMIN_PROVIDER">
6610                     <context link="provider" field="owner"/>
6611                 </retrieve>
6612                 <update permission="ADMIN_PROVIDER">
6613                     <context link="provider" field="owner"/>
6614                 </update>
6615                 <delete permission="ADMIN_PROVIDER">
6616                     <context link="provider" field="owner"/>
6617                 </delete>
6618             </actions>
6619         </permacrud>
6620     </class>
6621         <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">
6622                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6623                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6624                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6625                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6626                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6627                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6628                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6629                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6630                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6631                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6632                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6633                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6634                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6635                 </fields>
6636                 <links>
6637                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6638                 </links>
6639         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6640             <actions>
6641                 <create permission="ADMIN_PROVIDER">
6642                     <context link="contact" jump='provider' field="owner"/>
6643                 </create>
6644                 <retrieve permission="ADMIN_PROVIDER">
6645                     <context link="contact" jump='provider' field="owner"/>
6646                 </retrieve>
6647                 <update permission="ADMIN_PROVIDER">
6648                     <context link="contact" jump='provider' field="owner"/>
6649                 </update>
6650                 <delete permission="ADMIN_PROVIDER">
6651                     <context link="contact" jump='provider' field="owner"/>
6652                 </delete>
6653             </actions>
6654         </permacrud>
6655         </class>
6656
6657         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6658                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6659                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6660                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6661                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6662                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6663                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6664                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6665                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6666                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6667                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6668                 </fields>
6669                 <links>
6670                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6671                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6672                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6673                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6674                 </links>
6675         </class>
6676
6677         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6678                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6679                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6680                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6681                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6682                 </fields>
6683                 <links>
6684             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6685                 </links>
6686                 <!--
6687                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6688                         But here's what it should look like if we ever do use pcrud.
6689                 -->
6690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6691                         <actions>
6692                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6693                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6694                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6695                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6696                         </actions>
6697                 </permacrud>
6698         </class>
6699
6700         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6701                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6702                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6703                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6704                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6705                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6706                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6707                 </fields>
6708                 <links>
6709                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6710                 </links>
6711                 <!--
6712                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6713                         But here's what it should look like if we ever do use pcrud.
6714                 -->
6715                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6716                         <actions>
6717                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6718                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6719                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6720                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6721                         </actions>
6722                 </permacrud>
6723         </class>
6724
6725         <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">
6726                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6727                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6728                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6729                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6730                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6731                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6732                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6733                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6734                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6735                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6736                 </fields>
6737                 <links>
6738                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6739                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6740             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6741             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6742                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6743                 </links>
6744         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6745             <actions>
6746                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6747                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6748                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6749                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6750             </actions>
6751         </permacrud>
6752         </class>
6753
6754         <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">
6755                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6756                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6757                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6758                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6759                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6760                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6761                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6762                 </fields>
6763                 <links>
6764                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6765                 </links>
6766                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6767                         <actions>
6768                                 <create permission="ADMIN_FUNDING_SOURCE">
6769                     <context link="funding_source" field="owner"/>
6770                 </create>
6771                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6772                     <context link="funding_source" field="owner"/>
6773                 </retrieve>
6774                                 <update permission="ADMIN_FUNDING_SOURCE">
6775                     <context link="funding_source" field="owner"/>
6776                 </update>
6777                                 <delete permission="ADMIN_FUNDING_SOURCE">
6778                     <context link="funding_source" field="owner"/>
6779                 </delete>
6780                         </actions>
6781                 </permacrud>
6782         </class>
6783
6784         <class id="acqofscred" controller="open-ils.cstore" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
6785                 <fields oils_persist:primary="id">
6786                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6787                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6788                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6789                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6790                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6791                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6792                 </fields>
6793                 <links>
6794                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6795                 </links>
6796         </class>
6797
6798         <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">
6799                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6800                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6801                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6802                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6803                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6804                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6805                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6806                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6807                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6808                 </fields>
6809                 <links>
6810                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6811                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6812                 </links>
6813                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6814                         <actions>
6815                                 <create permission="ADMIN_ACQ_FUND">
6816                     <context link="fund" field="org"/>
6817                 </create>
6818                                 <retrieve permission="ADMIN_ACQ_FUND">
6819                     <context link="fund" field="org"/>
6820                 </retrieve>
6821                                 <update permission="ADMIN_ACQ_FUND">
6822                     <context link="fund" field="org"/>
6823                 </update>
6824                                 <delete permission="ADMIN_ACQ_FUND">
6825                     <context link="fund" field="org"/>
6826                 </delete>
6827                         </actions>
6828                 </permacrud>
6829         </class>
6830
6831         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6832                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6833                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6834                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6835                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6836                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6837                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6838                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6839                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6840                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6841                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6842                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6843                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6844                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6845                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6846                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6847                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6848                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
6849                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
6850                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
6851                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
6852                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
6853                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
6854                 </fields>
6855                 <links>
6856                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6857                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6858             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6859             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6860             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6861             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
6862             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
6863             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
6864             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
6865             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
6866             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
6867                 </links>
6868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6869             <actions>
6870                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6871                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6872                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6873                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6874             </actions>
6875         </permacrud>
6876         </class>
6877
6878         <class id="acqfat" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_allocation_total" reporter:label="Fund Allocation Total">
6879                 <fields oils_persist:primary="fund">
6880                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6881                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6882                 </fields>
6883                 <links>
6884                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6885                 </links>
6886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6887             <actions>
6888                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6889                                         <context link="fund" field="org" />
6890                 </retrieve>
6891             </actions>
6892         </permacrud>
6893         </class>
6894
6895         <class id="acqfdt" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_debit_total" reporter:label="Total Debit from Fund">
6896                 <fields oils_persist:primary="fund">
6897                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6898                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6899                 </fields>
6900                 <links>
6901                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6902                 </links>
6903         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6904             <actions>
6905                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6906                                         <context link="fund" field="org" />
6907                 </retrieve>
6908             </actions>
6909         </permacrud>
6910         </class>
6911
6912         <class id="acqfet" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_encumbrance_total" reporter:label="Total Fund Encumbrance">
6913                 <fields oils_persist:primary="fund">
6914                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6915                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6916                 </fields>
6917                 <links>
6918                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6919                 </links>
6920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6921             <actions>
6922                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6923                                         <context link="fund" field="org" />
6924                 </retrieve>
6925             </actions>
6926         </permacrud>
6927         </class>
6928
6929         <class id="acqfst" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_total" reporter:label="Total Spent from Fund">
6930                 <fields oils_persist:primary="fund">
6931                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6932                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6933                 </fields>
6934                 <links>
6935                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6936                 </links>
6937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6938             <actions>
6939                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6940                                         <context link="fund" field="org" />
6941                 </retrieve>
6942             </actions>
6943         </permacrud>
6944         </class>
6945
6946         <class id="acqfcb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_combined_balance" reporter:label="Fund Combined Balance">
6947                 <fields oils_persist:primary="fund">
6948                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6949                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6950                 </fields>
6951                 <links>
6952                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6953                 </links>
6954         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6955             <actions>
6956                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6957                                         <context link="fund" field="org" />
6958                 </retrieve>
6959             </actions>
6960         </permacrud>
6961         </class>
6962
6963    <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">
6964         <fields oils_persist:primary="fund">
6965             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6966             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6967         </fields>
6968         <links>
6969             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6970         </links>
6971     </class>
6972
6973    <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">
6974         <fields oils_persist:primary="fund">
6975             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6976             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6977         </fields>
6978         <links>
6979             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6980         </links>
6981     </class>
6982
6983    <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">
6984         <fields oils_persist:primary="fund">
6985             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6986             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6987         </fields>
6988         <links>
6989             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6990         </links>
6991     </class>
6992
6993    <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">
6994         <fields oils_persist:primary="fund">
6995             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6996             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6997         </fields>
6998         <links>
6999             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7000         </links>
7001     </class>
7002
7003    <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">
7004         <fields oils_persist:primary="fund">
7005             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7006             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7007         </fields>
7008         <links>
7009             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7010         </links>
7011     </class>
7012
7013         <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">
7014                 <fields oils_persist:primary="funding_source">
7015                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7016                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7017                 </fields>
7018                 <links>
7019                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7020                 </links>
7021         </class>
7022
7023         <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">
7024                 <fields oils_persist:primary="funding_source">
7025                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7026                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7027                 </fields>
7028                 <links>
7029                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7030                 </links>
7031         </class>
7032
7033         <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">
7034                 <fields oils_persist:primary="funding_source">
7035                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7036                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7037                 </fields>
7038                 <links>
7039                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7040                 </links>
7041         </class>
7042
7043         <class id="acqfsb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_balance" reporter:label="Fund Spent Balance">
7044                 <fields oils_persist:primary="fund">
7045                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7046                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7047                 </fields>
7048                 <links>
7049                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7050                 </links>
7051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7052             <actions>
7053                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7054                                         <context link="fund" field="org" />
7055                 </retrieve>
7056             </actions>
7057         </permacrud>
7058     </class>
7059
7060         <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">
7061                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7062                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7063                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7064                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7065                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7066                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7067                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7068                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7069                 </fields>
7070                 <links>
7071                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7072                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7073                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7074                 </links>
7075                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7076                         <actions>
7077                                 <create permission="ADMIN_ACQ_FUND">
7078                     <context link="fund" field="org"/>
7079                 </create>
7080                                 <retrieve permission="ADMIN_ACQ_FUND">
7081                     <context link="fund" field="org"/>
7082                 </retrieve>
7083                                 <update permission="ADMIN_ACQ_FUND">
7084                     <context link="fund" field="org"/>
7085                 </update>
7086                                 <delete permission="ADMIN_ACQ_FUND">
7087                     <context link="fund" field="org"/>
7088                 </delete>
7089                         </actions>
7090                 </permacrud>
7091         </class>
7092
7093     <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">
7094         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7095             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7096             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7097             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7098             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7099             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7100             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7101             <field reporter:label="Note" name="note" reporter:datatype="text" />
7102             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7103         </fields>
7104         <links>
7105             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7106             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7107             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7108         </links>
7109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7110                         <actions>
7111                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7112                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7113                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7114                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7115                         </actions>
7116                 </permacrud>
7117     </class>
7118
7119         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7120                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7121                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7122                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7123                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7124                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7125                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7126                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7127                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7128                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7129                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7130                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7131                 </fields>
7132                 <links>
7133                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7134                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7135                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7136                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7137                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7138                 </links>
7139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7140                         <actions>
7141                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7142                         </actions>
7143                 </permacrud>
7144         </class>
7145
7146         <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">
7147                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7148                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7149                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7150                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7151                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7152                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7153                 </fields>
7154                 <links>
7155                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7156                 </links>
7157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7158                         <actions>
7159                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7160                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7161                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7162                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7163                         </actions>
7164                 </permacrud>
7165         </class>
7166
7167         <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">
7168                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7169                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7170                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7171                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7172                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7173                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7174                         <field reporter:label="State" name="state" reporter:datatype="text" />
7175                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7176                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7177                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7178                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7179                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7180                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7181                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7182                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7183                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7184                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7185                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7186                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7187                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7188                 </fields>
7189                 <links>
7190                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7191                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7192                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7193                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7194                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7195                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7196                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7197                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7198                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7199                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7200                 </links>
7201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7202                         <actions>
7203                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7204                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7205                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7206                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7207                         </actions>
7208                 </permacrud>
7209         </class>
7210
7211         <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">
7212                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7213                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7214                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7215                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7216                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7217                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7218                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7219                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7220                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7221                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7222                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7223                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7224                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7225                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7226                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7227                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7228                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7229                 </fields>
7230                 <links>
7231                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7232                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7233                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7234                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7235                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7236                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7237                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7238                 </links>
7239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7240             <actions>
7241                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7242             </actions>
7243                 </permacrud>
7244         </class>
7245
7246         <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">
7247                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7248                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7249                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7250                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7251                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7252                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7253                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7254                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7255                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7256                 </fields>
7257                 <links>
7258                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7259                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7260                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7261                 </links>
7262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7263             <actions>
7264                 <create permission="CREATE_PURCHASE_ORDER">
7265                     <context link="purchase_order" field="ordering_agency"/>
7266                 </create>
7267                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7268                     <context link="purchase_order" field="ordering_agency"/>
7269                 </retrieve>
7270                 <update permission="CREATE_PURCHASE_ORDER">
7271                     <context link="purchase_order" field="ordering_agency"/>
7272                 </update>
7273                 <delete permission="CREATE_PURCHASE_ORDER">
7274                     <context link="purchase_order" field="ordering_agency"/>
7275                 </delete>
7276             </actions>
7277                 </permacrud>
7278         </class>
7279
7280         <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">
7281                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7282                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7283                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7284                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7285                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7286                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7287                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7288                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7289                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7290                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7291                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7292                 </fields>
7293                 <links>
7294                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7295                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7296                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7297                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7298                 </links>
7299                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7300             <actions>
7301                 <create permission="CREATE_PURCHASE_ORDER">
7302                     <context link="purchase_order" field="ordering_agency"/>
7303                 </create>
7304                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7305                     <context link="purchase_order" field="ordering_agency"/>
7306                 </retrieve>
7307                 <update permission="CREATE_PURCHASE_ORDER">
7308                     <context link="purchase_order" field="ordering_agency"/>
7309                 </update>
7310                 <delete permission="CREATE_PURCHASE_ORDER">
7311                     <context link="purchase_order" field="ordering_agency"/>
7312                 </delete>
7313             </actions>
7314                 </permacrud>
7315         </class>
7316
7317         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7318                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7319                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7320                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7321                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7322                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7323                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7324                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7325                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7326                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7327                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7328                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7329                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7330                         <field reporter:label="State" name="state" reporter:datatype="text" />
7331                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7332                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7333                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7334                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7335                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7336                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7337                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7338                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7339                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7340                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7341                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7342                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7343                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7344                 </fields>
7345                 <links>
7346                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7347                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7348                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7349                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7350                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7351                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7352                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7353                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7354                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7355                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7356                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7357                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7358                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7359                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7360                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7361                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7362                 </links>
7363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7364                         <actions>
7365                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7366                                         <context link="purchase_order" field="ordering_agency"/>
7367                                         <context link="picklist" field="org_unit"/>
7368                                 </retrieve>
7369                         </actions>
7370                 </permacrud>
7371         </class>
7372
7373         <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">
7374                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7375                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7376                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7377                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7378                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7379                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7380                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7381                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7382                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7383                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7384                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7385                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7386                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7387                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7388                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7389                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7390                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7391                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7392                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7393                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7394                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7395                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7396                 </fields>
7397                 <links>
7398                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7399                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7400                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7401                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7402                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7403                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7404                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7405                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7406                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7407                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7408                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7409                 </links>
7410                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7411                         <actions>
7412                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7413                                         <context link="purchase_order" field="ordering_agency"/>
7414                                         <context link="picklist" field="org_unit"/>
7415                                 </retrieve>
7416                         </actions>
7417                 </permacrud>
7418         </class>
7419
7420         <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">
7421                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7422                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7423                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7424                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7425                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7426                 </fields>
7427                 <links>
7428                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7429                 </links>
7430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7431                         <actions>
7432                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7433                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7434                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7435                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7436                         </actions>
7437                 </permacrud>
7438         </class>
7439
7440         <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">
7441                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7442                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7443                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7444                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7445                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7446                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7447                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7448                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7449                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7450                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7451                 </fields>
7452                 <links>
7453                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7454                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7455                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7456                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7457                 </links>
7458         </class>
7459
7460         <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">
7461                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7462                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7463                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7464                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7465                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7466                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7467                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7468                 </fields>
7469                 <links>
7470                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7471                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7472                 </links>
7473         </class>
7474
7475         <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">
7476                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7477                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7478                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7479                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7480                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7481                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7482                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7483                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7484                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7485                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7486                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7487                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7488                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7489                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7490                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7491                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7492                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7493                 </fields>
7494                 <links>
7495                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7496                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7497                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7498                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7499                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7500                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7501                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7502                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7503                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7504                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7505                 </links>
7506         </class>
7507
7508         <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">
7509                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7510                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7511                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7512                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7513                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7514                 </fields>
7515                 <links/>
7516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7517                         <actions>
7518                                 <retrieve />
7519                         </actions>
7520                 </permacrud>
7521         </class>
7522
7523         <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">
7524                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7525                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7526                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7527                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7528                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7529                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7530             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7531                 </fields>
7532                 <links/>
7533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7534             <actions>
7535                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7536                 <retrieve />
7537                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7538                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7539             </actions>
7540         </permacrud>
7541         </class>
7542
7543         <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">
7544                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7545                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7546                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7547                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7548                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7549                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7550                 </fields>
7551                 <links/>
7552         </class>
7553         <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">
7554                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7555                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7556                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7557                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7558                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7559                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7560                 </fields>
7561                 <links>
7562                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7563                 </links>
7564         </class>
7565
7566         <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">
7567             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7568                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7569                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7570                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7571                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7572                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7573                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7574         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7575
7576             </fields>
7577             <links>
7578                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7579             </links>
7580             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7581                 <actions>
7582                     <create permission="ADMIN_PROVIDER">
7583                         <context link="provider" field="owner"/>
7584                     </create>
7585                     <retrieve permission="ADMIN_PROVIDER">
7586                         <context link="provider" field="owner"/>
7587                     </retrieve>
7588                     <update permission="ADMIN_PROVIDER">
7589                         <context link="provider" field="owner"/>
7590                     </update>
7591                     <delete permission="ADMIN_PROVIDER">
7592                         <context link="provider" field="owner"/>
7593                     </delete>
7594                 </actions>
7595             </permacrud>
7596         </class>
7597         
7598         <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">
7599             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7600                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7601                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7602                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7603                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7604             </fields>
7605             <links>
7606                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7607             </links>
7608             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7609                 <actions>
7610                     <create permission="ADMIN_PROVIDER">
7611                         <context link="provider" field="owner"/>
7612                     </create>
7613                     <retrieve permission="ADMIN_PROVIDER">
7614                         <context link="provider" field="owner"/>
7615                     </retrieve>
7616                     <update permission="ADMIN_PROVIDER">
7617                         <context link="provider" field="owner"/>
7618                     </update>
7619                     <delete permission="ADMIN_PROVIDER">
7620                         <context link="provider" field="owner"/>
7621                     </delete>
7622                 </actions>
7623             </permacrud>
7624         </class>
7625         
7626         <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">
7627             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7628                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7629                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7630                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7631                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7632                 </fields>
7633                 <links/>
7634         </class>
7635
7636         <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">
7637                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7638                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7639                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7640                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7641                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7642                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7643                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7644                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7645                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7646                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7647                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7648                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7649                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7650                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7651                 </fields>
7652                 <links>
7653                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7654                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7655                 </links>
7656         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7657             <actions>
7658                 <create permission="ADMIN_PROVIDER">
7659                     <context link="provider" field="owner"/>
7660                 </create>
7661                 <retrieve permission="ADMIN_PROVIDER">
7662                     <context link="provider" field="owner"/>
7663                 </retrieve>
7664                 <update permission="ADMIN_PROVIDER">
7665                     <context link="provider" field="owner"/>
7666                 </update>
7667                 <delete permission="ADMIN_PROVIDER">
7668                     <context link="provider" field="owner"/>
7669                 </delete>
7670             </actions>
7671         </permacrud>
7672         </class>
7673
7674         <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">
7675                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7676                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7677                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7678                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7679                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7680                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7681                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7682                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7683                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7684                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7685                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7686                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7687                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7688                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7689                 </fields>
7690                 <links>
7691                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7692                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7693                 </links>
7694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7695             <actions>
7696                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7697                     <context link="account" jump="provider" field="owner"/>
7698                 </retrieve>
7699                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7700                     <context link="account" jump="provider" field="owner"/>
7701                 </update>
7702                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7703                     <context link="account" jump="provider" field="owner"/>
7704                 </delete>
7705             </actions>
7706         </permacrud>
7707         </class>
7708
7709
7710         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7711                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7712                         <field name="id" reporter:datatype="id" />
7713                         <field name="parent" reporter:datatype="link"/>
7714                         <field name="owner" reporter:datatype="link"/>
7715                         <field name="create_time" reporter:datatype="timestamp"/>
7716                         <field name="name" reporter:datatype="text"/>
7717                         <field name="shared" reporter:datatype="bool"/>
7718                         <field name="share_with" reporter:datatype="link"/>
7719                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7720                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7721                 </fields>
7722                 <links>
7723                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7724                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7725                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7726                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7727                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7728                 </links>
7729         </class>
7730         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7731                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7732                         <field name="id" reporter:datatype="id" />
7733                         <field name="parent" reporter:datatype="link"/>
7734                         <field name="owner" reporter:datatype="link"/>
7735                         <field name="create_time" reporter:datatype="timestamp"/>
7736                         <field name="name" reporter:datatype="text"/>
7737                         <field name="shared" reporter:datatype="bool"/>
7738                         <field name="share_with" reporter:datatype="link"/>
7739                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7740                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7741                 </fields>
7742                 <links>
7743                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7744                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7745                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7746                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7747                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7748                 </links>
7749         </class>
7750         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7751                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7752                         <field name="id" reporter:datatype="id" />
7753                         <field name="parent" reporter:datatype="link"/>
7754                         <field name="owner" reporter:datatype="link"/>
7755                         <field name="create_time" reporter:datatype="timestamp"/>
7756                         <field name="name" reporter:datatype="text"/>
7757                         <field name="shared" reporter:datatype="bool"/>
7758                         <field name="share_with" reporter:datatype="link"/>
7759                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7760                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7761                 </fields>
7762                 <links>
7763                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7764                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7765                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7766                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7767                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7768                 </links>
7769         </class>
7770         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7771                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7772                         <field name="id" reporter:datatype="id" />
7773                         <field name="owner" reporter:datatype="link"/>
7774                         <field name="create_time" reporter:datatype="timestamp"/>
7775                         <field name="name" reporter:datatype="text"/>
7776                         <field name="data" reporter:datatype="text"/>
7777                         <field name="folder" reporter:datatype="link"/>
7778                         <field name="description" reporter:datatype="text"/>
7779                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7780                 </fields>
7781                 <links>
7782                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7783                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7784                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7785                 </links>
7786         </class>
7787         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7788                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7789                         <field name="id" reporter:datatype="id" />
7790                         <field name="owner" reporter:datatype="link"/>
7791                         <field name="create_time" reporter:datatype="timestamp"/>
7792                         <field name="template" reporter:datatype="link"/>
7793                         <field name="data" reporter:datatype="text"/>
7794                         <field name="folder" reporter:datatype="link"/>
7795                         <field name="recur" reporter:datatype="bool"/>
7796                         <field name="recurrence" reporter:datatype="interval"/>
7797                         <field name="name" reporter:datatype="text"/>
7798                         <field name="description" reporter:datatype="text"/>
7799                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7800                 </fields>
7801                 <links>
7802                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7803                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7804                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7805                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7806                 </links>
7807         </class>
7808         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7809                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7810                         <field name="id" reporter:datatype="id" />
7811                         <field name="runner" reporter:datatype="link"/>
7812                         <field name="start_time" reporter:datatype="timestamp"/>
7813                         <field name="complete_time" reporter:datatype="timestamp"/>
7814                         <field name="run_time" reporter:datatype="timestamp"/>
7815                         <field name="email" reporter:datatype="text"/>
7816                         <field name="excel_format" reporter:datatype="bool"/>
7817                         <field name="csv_format" reporter:datatype="bool"/>
7818                         <field name="html_format" reporter:datatype="bool"/>
7819                         <field name="error_code" reporter:datatype="int"/>
7820                         <field name="error_text" reporter:datatype="text"/>
7821                         <field name="report" reporter:datatype="link"/>
7822                         <field name="folder" reporter:datatype="link"/>
7823                         <field name="chart_pie" reporter:datatype="bool"/>
7824                         <field name="chart_bar" reporter:datatype="bool"/>
7825                         <field name="chart_line" reporter:datatype="bool"/>
7826                 </fields>
7827                 <links>
7828                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7829                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7830                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7831                 </links>
7832         </class>
7833         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
7834                 <fields oils_persist:primary="id">
7835                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7836                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7837                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7838                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7839                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7840                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7841                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7842                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7843                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7844                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7845                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7846                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7847                 </fields>
7848                 <links>
7849                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7850                 </links>
7851         </class>
7852         <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">
7853                 <fields oils_persist:primary="id">
7854                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7855                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7856                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7857                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7858                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7859                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7860                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7861                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7862                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7863                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7864                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7865                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7866                 </fields>
7867                 <links>
7868                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7869                 </links>
7870         </class>
7871         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7872                 <fields oils_persist:primary="id">
7873                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7874                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7875                         <field reporter:label="Fingerprint" name="fingerprint" />
7876                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7877                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7878                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7879                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7880                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7881                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7882                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7883                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7884                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7885                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7886                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7887                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7888                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7889                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7890                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7891                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7892                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7893                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7894                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7895                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7896                 </fields>
7897                 <links>
7898                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7899                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7900                 </links>
7901         </class>
7902         <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">
7903                 <fields oils_persist:primary="id">
7904                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7905                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7906                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7907                 </fields>
7908                 <links>
7909                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7910                 </links>
7911         </class>
7912         <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">
7913                 <fields oils_persist:primary="id">
7914                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7915                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7916                 </fields>
7917                 <links>
7918                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7919                 </links>
7920         </class>
7921         <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">
7922                 <fields oils_persist:primary="id">
7923                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7924                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7925                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7926                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7927                 </fields>
7928                 <links>
7929                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7930                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7931                 </links>
7932         </class>
7933         <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">
7934                 <fields oils_persist:primary="xact">
7935                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7936                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7937                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7938                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7939                 </fields>
7940                 <links>
7941                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7942                 </links>
7943         </class>
7944         <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">
7945                 <fields oils_persist:primary="xact">
7946                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7947                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7948                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7949                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7950                 </fields>
7951                 <links>
7952                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7953                 </links>
7954         </class>
7955         <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)">
7956                 <fields oils_persist:primary="id">
7957                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7958                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7959                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7960                 </fields>
7961                 <links>
7962                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7963                 </links>
7964         </class>
7965         <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">
7966                 <fields oils_persist:primary="id">
7967                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7968                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7969                 </fields>
7970                 <links>
7971                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7972                 </links>
7973         </class>
7974         <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">
7975                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7976                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7977                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7978                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7979                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7980                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7981                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7982                 </fields>
7983                 <links>
7984                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7985                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7986                 </links>
7987                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7988                         <actions>
7989                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7990                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7991                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7992                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7993                         </actions>
7994                 </permacrud>
7995         </class>
7996         <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">
7997                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7998                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7999                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8000                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8001                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8002                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8003                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8004                 </fields>
8005                 <links>
8006                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8007                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8008                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8009                 </links>
8010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8011                         <actions>
8012                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8013                                         <context link="formula" field="owner"/>
8014                                 </create>
8015                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8016                                         <context link="formula" field="owner"/>
8017                                 </retrieve>
8018                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8019                                         <context link="formula" field="owner"/>
8020                                 </update>
8021                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8022                                         <context link="formula" field="owner"/>
8023                                 </delete>
8024                         </actions>
8025                 </permacrud>
8026         </class>
8027
8028         <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">
8029                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8030                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8031                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8032                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8033                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8034                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8035                 </fields>
8036                 <links>
8037                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8038                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8039                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8040                 </links>
8041                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8042                         <actions>
8043                                 <create permission="CREATE_PURCHASE_ORDER">
8044                                         <context link="formula" field="owner"/>
8045                 </create>
8046                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8047                                         <context link="formula" field="owner"/>
8048                 </retrieve>
8049                                 <update permission="CREATE_PURCHASE_ORDER">
8050                                         <context link="formula" field="owner"/>
8051                 </update>
8052                                 <delete permission="CREATE_PURCHASE_ORDER">
8053                                         <context link="formula" field="owner"/>
8054                 </delete>
8055                         </actions>
8056                 </permacrud>
8057         </class>
8058
8059         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8060                 <fields oils_persist:primary="id">
8061                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8062                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8063                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8064                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8065                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8066                 </fields>
8067                 <links>
8068                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8069                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8070                 </links>
8071         </class>
8072
8073         <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">
8074                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8075                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8076                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8077                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8078                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8079                 </fields>
8080                 <links>
8081                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8082                 </links>
8083                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8084                         <actions>
8085                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8086                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8087                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8088                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8089                         </actions>
8090                 </permacrud>
8091         </class>
8092
8093         <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">
8094                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8095                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8096                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8097                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8098                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8099                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8100                 </fields>
8101                 <links>
8102                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8103                 </links>
8104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8105                         <actions>
8106                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8107                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8108                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8109                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8110                         </actions>
8111                 </permacrud>
8112         </class>
8113
8114         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8115                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8116                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8117                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8118                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8119                 </fields>
8120                 <links>
8121                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8122                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8123                 </links>
8124         </class>
8125
8126         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8127                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8128                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8129                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8130                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8131                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8132                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8133                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8134                 </fields>
8135                 <links>
8136                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8137                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8138                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8139                 </links>
8140         </class>
8141
8142         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8143                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8144                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8145                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8146                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8147                 </fields>
8148                 <links>
8149                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8150                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8151                 </links>
8152         </class>
8153
8154         <class id="acqscle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
8155                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8156                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8157                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8158                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8159                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8160                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8161                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8162                 </fields>
8163                 <links>
8164                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8165                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8166                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8167                 </links>
8168         </class>
8169
8170         <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">
8171                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8172                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8173                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8174                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8175                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8176                 </fields>
8177                 <links>
8178                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8179                 </links>
8180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8181             <actions>
8182                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8183                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8184                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8185                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8186             </actions>
8187                 </permacrud>
8188         </class>
8189
8190         <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">
8191                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8192                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8193                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8194                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8195                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8196                 </fields>
8197                 <links>
8198                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8199                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8200                 </links>
8201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8202                         <actions>
8203                                 <create permission="ADMIN_CLAIM_POLICY">
8204                                         <context link="claim_policy" field="org_unit"/>
8205                 </create>
8206                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8207                                         <context link="claim_policy" field="org_unit"/>
8208                 </retrieve>
8209                                 <update permission="ADMIN_CLAIM_POLICY">
8210                                         <context link="claim_policy" field="org_unit"/>
8211                 </update>
8212                                 <delete permission="ADMIN_CLAIM_POLICY">
8213                                         <context link="claim_policy" field="org_unit"/>
8214                 </delete>
8215                         </actions>
8216                 </permacrud>
8217         </class>
8218
8219     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8220         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8221             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8222             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8223             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8224             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8225             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8226             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8227             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8228             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8229             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8230             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8231             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8232             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8233             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8234             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8235             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8236         </fields>
8237     </class>
8238
8239     <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">
8240         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8241             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8242             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8243             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8244             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8245             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8246         </fields>
8247     </class>
8248
8249     <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">
8250         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8251             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8252             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8253             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8254             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8255             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8256             <field reporter:label="City" name="city" reporter:datatype="text"/>
8257             <field reporter:label="State" name="state" reporter:datatype="text"/>
8258             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8259             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8260             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8261         </fields>
8262     </class>
8263
8264     <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">
8265         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8266             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8267             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8268             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8269             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8270             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8271             <field reporter:label="City" name="city" reporter:datatype="text"/>
8272             <field reporter:label="State" name="state" reporter:datatype="text"/>
8273             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8274             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8275             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8276         </fields>
8277     </class>
8278
8279     <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">
8280         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8281             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8282             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8283             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8284             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8285             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8286             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8287         </fields>
8288     </class>
8289
8290         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8291                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8292                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8293                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8294                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8295                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8296                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8297                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8298                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8299                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8300                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8301                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8302                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8303                 </fields>
8304                 <links>
8305                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8306                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8307                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8308                 </links>
8309         </class>
8310
8311         <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
8312                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8313                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8314                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8315                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8316                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8317                 </fields>
8318                 <links>
8319                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8320                 </links>
8321         </class>
8322
8323     <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">
8324         <fields>
8325             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8326             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8327             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8328         </fields>
8329                 <links>
8330                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8331                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8332                 </links>
8333     </class>
8334
8335     <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">
8336         <fields>
8337             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8338             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8339         </fields>
8340                 <links>
8341                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8342                 </links>
8343     </class>
8344
8345     <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">
8346         <fields>
8347             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8348             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8349             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8350         </fields>
8351                 <links>
8352                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8353                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8354                 </links>
8355     </class>
8356
8357     <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">
8358         <fields>
8359             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8360             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8361         </fields>
8362                 <links>
8363                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8364                 </links>
8365     </class>
8366
8367     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8368                 <oils_persist:source_definition>
8369
8370             SELECT  DISTINCT l.*
8371               FROM  action.unfulfilled_hold_loops l
8372                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8373               WHERE l.count = m.max
8374
8375                 </oils_persist:source_definition>
8376         <fields>
8377             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8378             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8379             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8380         </fields>
8381                 <links>
8382                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8383                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8384                 </links>
8385     </class>
8386
8387         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8388                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8389                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8390                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8391                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8392                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8393                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8394                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8395                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8396                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8397                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8398                 </fields>
8399                 <links>
8400                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8401                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8402                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8403                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8404                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8405                 </links>
8406         </class>
8407
8408         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8409                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8410                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8411                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8412                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8413                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8414                 </fields>
8415                 <links>
8416                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8417                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8418                 </links>
8419         </class>
8420
8421         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8422                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8423                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8424                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8425                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8426                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8427                 </fields>
8428                 <links>
8429                 </links>
8430         </class>
8431
8432         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8433                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8434                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8435                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8436                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8437                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8438                 </fields>
8439                 <links>
8440                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8441                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8442                 </links>
8443         </class>
8444         
8445         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8446                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8447                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8448                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8449                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8450                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8451                 </fields>
8452                 <links>
8453                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8454                 </links>
8455         </class>
8456         
8457         <class id="qfpd" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
8458                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8459                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8460                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8461                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8462                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8463                 </fields>
8464                 <links>
8465                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8466                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8467                 </links>
8468         </class>
8469
8470         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8471                 <fields oils_persist:primary="name">
8472                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8473                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8474                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8475                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8476                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8477                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8478                 </fields>
8479                 <links>
8480                 </links>
8481         </class>
8482
8483         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8484                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8485                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8486                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8487                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8488                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8489                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8490                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8491                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8492                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8493                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8494                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8495                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8496                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8497                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8498                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8499                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8500                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8501                 </fields>
8502                 <links>
8503                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8504                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8505                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8506                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8507                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8508                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8509                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8510                 </links>
8511         </class>
8512
8513         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8514                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8515                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8516                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8517                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8518                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8519                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8520                 </fields>
8521                 <links>
8522                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8523                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8524                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8525                 </links>
8526         </class>
8527
8528         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8529                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8530                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8531                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8532                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8533                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8534                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8535                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8536                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8537                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8538                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8539                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8540                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8541                 </fields>
8542                 <links>
8543                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8544                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8545                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8546                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8547                 </links>
8548         </class>
8549
8550         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8551                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8552                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8553                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8554                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8555                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8556                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8557                 </fields>
8558                 <links>
8559                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8560                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8561                 </links>
8562         </class>
8563
8564         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8565                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8566                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8567                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8568                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8569                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8570                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8571                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8572                 </fields>
8573                 <links>
8574                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8575                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8576                 </links>
8577         </class>
8578
8579         <class id="qobi" controller="open-ils.cstore" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
8580                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8581                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8582                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8583                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8584                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8585                 </fields>
8586                 <links>
8587                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8588                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8589                 </links>
8590         </class>
8591
8592         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8593                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8594                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8595                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8596                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8597                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8598                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8599                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8600                 </fields>
8601                 <links>
8602                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8603                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8604                 </links>
8605         </class>
8606
8607         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8608                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8609                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8610                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8611                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8612                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8613                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8614                 </fields>
8615                 <links>
8616                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8617                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8618                 </links>
8619         </class>
8620
8621         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8622                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8623                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8624                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8625                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8626                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8627                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8628                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8629                 </fields>
8630                 <links>
8631                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8632                 </links>
8633         </class>
8634
8635         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
8636                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8637                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8638                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8639                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8640                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8641                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8642                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8643                 </fields>
8644                 <links>
8645                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8646                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8647                 </links>
8648         </class>
8649
8650         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
8651                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8652                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8653                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8654                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8655                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8656                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8657                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8658                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8659                 </fields>
8660                 <links>
8661                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8662                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8663                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8664                 </links>
8665         </class>
8666
8667         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
8668                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8669                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8670                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8671                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8672                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8673                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8674                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8675                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8676                 </fields>
8677                 <links>
8678                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8679                 </links>
8680         </class>
8681
8682         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
8683                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8684                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8685                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8686                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8687                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8688                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8689                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8690                 </fields>
8691                 <links>
8692                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8693                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8694                 </links>
8695         </class>
8696
8697         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
8698                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8699                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8700                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8701                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8702                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8703                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8704                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8705                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8706                 </fields>
8707                 <links>
8708                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8709                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8710                 </links>
8711         </class>
8712
8713         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
8714                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8715                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8716                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8717                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8718                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8719                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8720                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8721                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8722                 </fields>
8723                 <links>
8724                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8725                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8726                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8727                 </links>
8728         </class>
8729
8730         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
8731                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8732                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8733                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8734                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8735                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8736                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8737                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8738                 </fields>
8739                 <links>
8740                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8741                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8742                 </links>
8743         </class>
8744
8745         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
8746                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8747                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8748                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8749                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8750                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8751                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8752                 </fields>
8753                 <links>
8754                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8755                 </links>
8756         </class>
8757
8758         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
8759                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8760                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8761                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8762                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8763                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8764                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8765                 </fields>
8766                 <links>
8767                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8768                 </links>
8769         </class>
8770
8771         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
8772                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8773                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8774                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8775                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8776                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8777                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8778                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8779                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8780                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8781                 </fields>
8782                 <links>
8783                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8784                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8785                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8786                 </links>
8787         </class>
8788
8789         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
8790                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8791                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8792                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8793                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8794                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8795                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8796                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8797                 </fields>
8798                 <links>
8799                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8800                 </links>
8801         </class>
8802
8803         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
8804                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8805                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8806                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8807                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8808                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8809                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8810                 </fields>
8811                 <links>
8812                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8813                 </links>
8814         </class>
8815
8816         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
8817                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8818                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8819                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8820                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8821                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8822                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8823                 </fields>
8824                 <links>
8825                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8826                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8827                 </links>
8828         </class>
8829
8830         <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">
8831                 <fields oils_persist:primary="id">
8832                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8833                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8834                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8835                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8836                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8837                 </fields>
8838                 <links>
8839                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8840                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8841                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8842                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8843                 </links>
8844         </class>
8845
8846         <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">
8847                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8848                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8849                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8850                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8851                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8852                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8853                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8854                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8855                 </fields>
8856                 <links/>
8857                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8858                         <actions>
8859                                 <retrieve/>
8860                         </actions>
8861                 </permacrud>
8862         </class>
8863
8864         <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">
8865                 <fields oils_persist:primary="ptype_key">
8866                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8867                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8868                 </fields>
8869                 <links/>
8870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8871                         <actions>
8872                                 <retrieve/>
8873                         </actions>
8874                 </permacrud>
8875         </class>
8876
8877         <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">
8878                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8879                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8880                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8881                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8882                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8883                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8884                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8885                 </fields>
8886                 <links>
8887                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8888                 </links>
8889                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8890                         <actions>
8891                                 <retrieve/>
8892                         </actions>
8893                 </permacrud>
8894         </class>
8895
8896         <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">
8897                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8898                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8899                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8900                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8901                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8902                 </fields>
8903                 <links>
8904                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8905                 </links>
8906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8907                         <actions>
8908                                 <retrieve/>
8909                         </actions>
8910                 </permacrud>
8911         </class>
8912
8913         <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">
8914                 <fields oils_persist:primary="code">
8915                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8916                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8917                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8918                 </fields>
8919                 <links/>
8920                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8921                         <actions>
8922                                 <retrieve/>
8923                         </actions>
8924                 </permacrud>
8925         </class>
8926
8927         <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">
8928                 <oils_persist:source_definition>
8929
8930             SELECT  b.id,
8931                     MAX(dcp.edit_date) AS last_delete_date
8932              FROM   biblio.record_entry b
8933                     JOIN asset.call_number cn ON (cn.record = b.id)
8934                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8935              WHERE  NOT b.deleted
8936              GROUP BY b.id
8937              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8938
8939                 </oils_persist:source_definition>
8940                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8941                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8942                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8943                 </fields>
8944                 <links>
8945                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8946                 </links>
8947                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8948                         <actions>
8949                                 <retrieve/>
8950                         </actions>
8951                 </permacrud>
8952         </class>
8953
8954         <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">
8955                 <oils_persist:source_definition>
8956
8957             -- -- 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.
8958             -- -- 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
8959             -- -- may not.
8960             -- SELECT
8961             --     bre.id AS "bib_id",
8962             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8963             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8964             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8965             -- FROM (
8966                 SELECT
8967                     y.bre AS "id",
8968                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8969                     y.hold_count AS "hold_count",
8970                     (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"
8971                 FROM (
8972                         SELECT
8973                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8974                             COUNT(*) AS "hold_count"
8975                         FROM action.hold_request h
8976                         WHERE
8977                             cancel_time IS NULL
8978                             AND fulfillment_time IS NULL
8979                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8980                         GROUP BY 1
8981                     )y LEFT JOIN (
8982                         SELECT 
8983                             (SELECT id
8984                                 FROM biblio.record_entry 
8985                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8986                             ) AS "bre", 
8987                             COUNT(*) AS "copy_count"
8988                         FROM asset.copy
8989                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8990                         WHERE copy.holdable 
8991                             AND NOT copy.deleted 
8992                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8993                         GROUP BY 1
8994                     )x ON x.bre = y.bre
8995                 -- )z RIGHT JOIN (
8996                 --     SELECT id
8997                 --     FROM biblio.record_entry
8998                 --     WHERE NOT deleted
8999                 -- )bre ON (z.bib_id = bre.id)
9000                 
9001
9002                 </oils_persist:source_definition>
9003                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9004                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9005                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9006                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9007                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9008                 </fields>
9009                 <links>
9010                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9011                 </links>
9012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9013                         <actions>
9014                                 <retrieve/>
9015                         </actions>
9016                 </permacrud>
9017         </class>
9018
9019         <class id="rhcrpbap" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library">
9020                 <oils_persist:source_definition>
9021             SELECT *,
9022                 CASE WHEN copy_count_at_pickup_library = 0 THEN 'Infinity'::FLOAT ELSE holds_at_pickup_library::FLOAT/copy_count_at_pickup_library END AS pickup_library_ratio,
9023                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9024             FROM
9025                 (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
9026                     FROM
9027                         action.hold_request ahr
9028                         JOIN reporter.hold_request_record rhrr USING (id)
9029                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9030                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9031                     WHERE
9032                         ahr.cancel_time IS NULL
9033                         AND ahr.fulfillment_time IS NULL
9034                     GROUP BY bib_record, pickup_lib
9035                 )x
9036                 JOIN
9037                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9038                     FROM
9039                         action.hold_request ahr
9040                         JOIN reporter.hold_request_record rhrr USING (id)
9041                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9042                     WHERE
9043                         ahr.cancel_time IS NULL
9044                         AND ahr.fulfillment_time IS NULL
9045                     GROUP BY bib_record
9046                 )y
9047                 USING (id)
9048                 </oils_persist:source_definition>
9049                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9050                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9051                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9052                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9053                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9054                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9055                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9056                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9057                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9058                 </fields>
9059                 <links>
9060                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9061                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9062                 </links>
9063                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9064                         <actions>
9065                                 <retrieve/>
9066                         </actions>
9067                 </permacrud>
9068         </class>
9069
9070         <class id="rlc" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_circ_date" oils_persist:readonly="true" reporter:label="Last Circulation or Creation Date">
9071                 <oils_persist:source_definition>
9072             SELECT
9073                 ac.id,
9074                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9075                 MAX(actac.xact_start) AS last_circ
9076             FROM asset.copy ac
9077                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9078             GROUP BY ac.id
9079
9080             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9081             --SELECT
9082             --    ac.id,
9083             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9084             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9085             --FROM asset.copy ac
9086             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9087             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9088             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9089                 </oils_persist:source_definition>
9090                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9091                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9092                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9093                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9094                 </fields>
9095                 <links>
9096                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9097                 </links>
9098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9099                         <actions>
9100                                 <retrieve/>
9101                         </actions>
9102                 </permacrud>
9103         </class>
9104
9105         <!-- ********************************************************************************************************************* -->
9106         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9107         <!-- ********************************************************************************************************************* -->
9108         <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">
9109                 <fields oils_persist:primary="id">
9110                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9111                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9112                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9113                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9114                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9115                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
9116                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9117                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
9118                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
9119                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
9120                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
9121                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
9122                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
9123                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
9124                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9125                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
9126                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
9127                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
9128                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
9129                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
9130                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
9131                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
9132                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
9133                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
9134                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
9135                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
9136                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
9137                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
9138                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
9139                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9140                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9141                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9142                 </fields>
9143                 <links>
9144                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9145                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
9146                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
9147                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
9148                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
9149                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
9150                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
9151                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
9152                 </links>
9153         </class>
9154
9155         <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">
9156                 <fields oils_persist:primary="id">
9157                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9158                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9159                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9160                 </fields>
9161                 <links>
9162                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9163                 </links>
9164         </class>
9165
9166         <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">
9167                 <fields oils_persist:primary="id">
9168                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9169                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9170                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9171                 </fields>
9172                 <links>
9173                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9174                 </links>
9175         </class>
9176
9177         <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">
9178                 <fields oils_persist:primary="id">
9179                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
9180
9181                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
9182                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
9183                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
9184
9185                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
9186                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
9187                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
9188
9189                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
9190                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
9191
9192                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9193                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
9194                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
9195
9196                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
9197                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
9198
9199                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
9200                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
9201                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
9202
9203                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
9204                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
9205                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
9206
9207                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9208                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
9209                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
9210                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
9211
9212                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
9213                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
9214
9215                 </fields>
9216                 <links>
9217                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
9218                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9219                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
9220                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
9221                 </links>
9222         </class>
9223
9224         <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">
9225                 <oils_persist:source_definition>
9226
9227             SELECT
9228                 po.ordering_agency AS ordering_agency,
9229                 po.id AS purchase_order,
9230                 li.id AS lineitem,
9231                 lid.id AS lineitem_detail,
9232                 cpa.id AS claim_policy_action
9233             FROM
9234                 acq.lineitem_detail lid
9235                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
9236                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
9237                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
9238                 JOIN acq.claim_policy_action cpa ON (
9239                     cpa.claim_policy = cp.id
9240
9241                     -- we only care about claim policy actions whose claim
9242                     -- interval we'd reached or exceeded
9243                     AND (NOW() - cpa.action_interval) &gt; po.order_date
9244
9245                     -- filter out all claim policy actions where claim events
9246                     -- have occurred on or after the action's action_interval
9247                     AND NOT EXISTS (
9248                         SELECT 1
9249                         FROM
9250                             acq.claim_event evt
9251                             JOIN acq.claim claim ON (
9252                                 claim.id = evt.claim
9253                                 AND claim.lineitem_detail = lid.id
9254                             )
9255                         WHERE
9256                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
9257                     )
9258                 )
9259             WHERE
9260                 lid.cancel_reason IS NULL
9261                 AND li.cancel_reason IS NULL -- belt/suspenders
9262                 AND po.cancel_reason IS NULL -- belt/suspenders
9263                 AND lid.recv_time IS NULL
9264                 AND po.state = 'on-order'
9265             ORDER BY 1, 2, 3, 4, 5
9266
9267                 </oils_persist:source_definition>
9268                 <fields>
9269                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9270                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9271                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9272                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9273                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9274                 </fields>
9275                 <links>
9276                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9277                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9278                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9279                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9280                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
9281                 </links>
9282         </class>
9283
9284         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
9285                 <oils_persist:source_definition>
9286
9287             SELECT 
9288                 li.id AS lineitem, 
9289                 (
9290                     SELECT COUNT(lid.id) 
9291                     FROM acq.lineitem_detail lid
9292                     WHERE lineitem = li.id
9293                 ) AS item_count,
9294                 (
9295                     SELECT COUNT(lid.id) 
9296                     FROM acq.lineitem_detail lid
9297                     WHERE recv_time IS NOT NULL AND lineitem = li.id
9298                 ) AS recv_count,
9299                 (
9300                     SELECT COUNT(lid.id) 
9301                     FROM acq.lineitem_detail lid
9302                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
9303                 ) AS cancel_count,
9304                 (
9305                     SELECT COUNT(lid.id) 
9306                     FROM acq.lineitem_detail lid
9307                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9308                     WHERE NOT debit.encumbrance AND lineitem = li.id
9309                 ) AS invoice_count,
9310                 (
9311                     SELECT COUNT(DISTINCT(lid.id)) 
9312                     FROM acq.lineitem_detail lid
9313                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
9314                     WHERE lineitem = li.id
9315                 ) AS claim_count,
9316                 (
9317                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
9318                     FROM acq.lineitem_detail lid
9319                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
9320                 ) AS estimated_amount,
9321                 (
9322                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9323                     FROM acq.lineitem_detail lid
9324                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9325                     WHERE debit.encumbrance AND lineitem = li.id
9326                 ) AS encumbrance_amount,
9327                 (
9328                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9329                     FROM acq.lineitem_detail lid
9330                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9331                     WHERE NOT debit.encumbrance AND lineitem = li.id
9332                 ) AS paid_amount
9333
9334                 FROM acq.lineitem AS li
9335         </oils_persist:source_definition>
9336                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9337                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9338                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9339                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9340                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9341                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9342                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9343                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9344                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9345                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9346                 </fields>
9347                 <links>
9348                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9349                 </links>
9350     </class>
9351
9352
9353         <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">
9354                 <oils_persist:source_definition>
9355
9356                         SELECT  t.*
9357                           FROM  action.transit_copy t
9358                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9359                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9360                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9361
9362                 </oils_persist:source_definition>
9363                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9364                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9365                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9366                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9367                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9368                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9369                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9370                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9371                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9372                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9373                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9374                 </fields>
9375                 <links>
9376                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9377                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9378                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9379                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9380                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9381                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9382                 </links>
9383         </class>
9384
9385     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9386                 <oils_persist:source_definition>
9387
9388         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9389                 SELECT
9390                         cp.id as copy,
9391                         COUNT(circ.id),
9392                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9393                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9394                 FROM
9395                         asset.copy cp
9396                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9397                 GROUP BY 1, 3, 4
9398                 UNION
9399                 SELECT
9400                         cp.id as copy,
9401                         COUNT(circ.id),
9402                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9403                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9404                 FROM
9405                         asset.copy cp
9406                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9407                 GROUP BY 1, 3, 4
9408                 UNION
9409                 SELECT
9410                         id as copy,
9411                         circ_count,
9412                         -1 AS year,
9413                         false as is_renewal
9414                 FROM
9415                         extend_reporter.legacy_circ_count
9416         )x GROUP BY 1, 3, 4
9417
9418                 </oils_persist:source_definition>
9419         <fields>
9420             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9421             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9422             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9423             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9424         </fields>
9425                 <links>
9426                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9427                 </links>
9428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9429                         <actions>
9430                                 <retrieve/>
9431                         </actions>
9432                 </permacrud>
9433     </class>
9434
9435         <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">
9436                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9437                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9438                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9439                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9440                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9441                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9442                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9443                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9444                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9445                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9446                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9447                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9448                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9449                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9450                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9451                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9452                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9453                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9454                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9455                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9456                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9457                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9458                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9459                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9460                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9461                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9462                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9463                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9464                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9465                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9466                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9467                 </fields>
9468                 <links>
9469                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9470                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9471                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9472                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9473                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9474                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9475                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9476                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9477                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9478                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9479                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9480                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9481                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9482                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9483                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9484                 </links>
9485         </class>
9486
9487     <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">
9488         <fields oils_persist:primary="id">
9489             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9490             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9491             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9492             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9493             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9494             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9495             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9496             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9497             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9498             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9499             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9500             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9501             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9502             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9503             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9504             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9505             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9506             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9507             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9508             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9509             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9510             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9511             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9512             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9513             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9514             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9515             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9516             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9517             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9518             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9519             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9520             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9521             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9522             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9523         </fields>
9524         <links>
9525             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9526             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9527             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9528             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9529             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9530         </links>
9531     </class>
9532
9533     <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">
9534         <fields oils_persist:primary="id">
9535             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9536             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9537             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9538             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9539         </fields>
9540         <links>
9541             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9542             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9543         </links>
9544     </class>
9545
9546     <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">
9547         <fields oils_persist:primary="owning_lib">
9548             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9549             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9550             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9551         </fields>
9552         <links>
9553             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9554         </links>
9555     </class>
9556
9557     <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">
9558         <fields oils_persist:primary="id">
9559             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9560             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9561             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9562             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9563             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9564         </fields>
9565         <links>
9566             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9567             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9568             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9569         </links>
9570     </class>
9571
9572     <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">
9573         <fields oils_persist:primary="circ_lib">
9574             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9575             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9576             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9577             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9578         </fields>
9579         <links>
9580             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9581             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9582         </links>
9583     </class>
9584
9585     <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">
9586         <fields oils_persist:primary="id">
9587             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9588             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9589             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9590             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9591             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9592         </fields>
9593         <links>
9594             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9595             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9596             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9597         </links>
9598     </class>
9599
9600     <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">
9601         <fields oils_persist:primary="home_ou">
9602             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9603             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9604             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9605             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9606         </fields>
9607         <links>
9608             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9609             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9610         </links>
9611     </class>
9612         <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">
9613                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9614                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9615                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9616                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9617                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9618                 </fields>
9619                 <links>
9620                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9621                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9622                 </links>
9623                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9624                         <actions>
9625                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9626                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9627                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9628                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9629                         </actions>
9630                 </permacrud>
9631         </class>
9632         <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">
9633                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9634                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9635                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9636                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9637                 </fields>
9638                 <links>
9639                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9640                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9641                         </links>
9642                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9643                 <actions>
9644                                 <create permission="ADMIN_ACQ_FUND_TAG">
9645                                         <context link="tag" field="owner"/>
9646                                 </create>
9647                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9648                                         <context link="tag" field="owner"/>
9649                                 </retrieve>
9650                                 <update permission="ADMIN_ACQ_FUND_TAG">
9651                                         <context link="tag" field="owner"/>
9652                                 </update>
9653                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9654                                         <context link="tag" field="owner"/>
9655                                 </delete>
9656                         </actions>
9657                 </permacrud>
9658         </class>
9659         <class id="acqus" controller="open-ils.cstore" oils_obj:fieldmapper="acq::unified_search" reporter:label="Acq Unified Search View" oils_persist:readonly="true">
9660                 <oils_persist:source_definition><![CDATA[
9661                 SELECT
9662                         jub.id AS lineitem,
9663                         po.id AS purchase_order,
9664                         pl.id AS picklist,
9665                         inv.id AS invoice
9666                 FROM acq.purchase_order po
9667                 FULL JOIN acq.lineitem jub ON (jub.purchase_order = po.id)
9668                 FULL JOIN acq.picklist pl ON (pl.id = jub.picklist)
9669                 LEFT JOIN acq.po_item poi ON (poi.purchase_order = po.id)
9670                 LEFT JOIN acq.invoice_item ii
9671                         ON (ii.po_item = poi.id OR ii.purchase_order = po.id)
9672                 LEFT JOIN acq.invoice_entry ie
9673                         ON (ie.lineitem = jub.id OR ie.purchase_order = po.id)
9674                 LEFT JOIN acq.invoice inv
9675                         ON (ie.invoice = inv.id OR ii.invoice = inv.id)
9676                 ]]></oils_persist:source_definition>
9677                 <fields>
9678                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
9679                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
9680                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
9681                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link"/>
9682                 </fields>
9683                 <links>
9684                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
9685                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
9686                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
9687                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
9688                 </links>
9689         </class>
9690         <class id="cbc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::barcode_completion" oils_persist:tablename="config.barcode_completion" reporter:label="Barcode Completions">
9691                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9692                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9693                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9694                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9695                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9696                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9697                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9698                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9699                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9700                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9701                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9702                 </fields>
9703                 <links>
9704                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9705                 </links>
9706                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9707                         <actions>
9708                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9709                                 <retrieve/>
9710                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9711                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9712                         </actions>
9713                 </permacrud>
9714         </class>
9715
9716         <class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">
9717                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
9718                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9719                         <field name="date_applied" reporter:datatype="timestamp"/>
9720                         <field name="org" reporter:datatype="org_unit"/>
9721                         <field name="original_value" reporter:datatype="text"/>
9722                         <field name="new_value" reporter:datatype="text"/>
9723                         <field name="field_name" reporter:datatype="link"/>
9724                 </fields>
9725                 <links>
9726                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
9727                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9728                 </links>
9729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9730                         <actions>
9731                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
9732                                 <retrieve/>
9733                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9734                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9735                         </actions>
9736                 </permacrud>
9737         </class>
9738         <class id="aaactsc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_actor_stat_cat" oils_persist:tablename="action.archive_actor_stat_cat" reporter:label="Circ-Archived Patron Statistical Category Entries">
9739                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9740                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9741                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9742                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9743                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9744                 </fields>
9745                 <links>
9746                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9747                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
9748                 </links>
9749         </class>
9750         <class id="aaasc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_asset_stat_cat" oils_persist:tablename="action.archive_asset_stat_cat" reporter:label="Circ-Archived Copy Statistical Category Entries">
9751                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9752                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9753                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9754                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9755                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9756                 </fields>
9757                 <links>
9758                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9759                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
9760                 </links>
9761         </class>
9762
9763
9764         <!-- ********************************************************************************************************************* -->
9765
9766 </IDL>
9767
9768 <!--
9769     vim:noet:ts=4:sw=4:
9770 -->