]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac...
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                         <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" datatype="int"/>
120             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
121             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
122             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
123             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
124             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
125             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
127             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
128             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" 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"/>
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="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">
729                 <fields oils_persist:primary="id">
730                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
731                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
732                 </fields>
733                 <links>
734                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
735                 </links>
736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
737             <actions>
738                 <retrieve/>
739             </actions>
740         </permacrud>
741         </class>
742
743         <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">
744                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
745                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
746                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
747                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
748                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
749                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
750                 </fields>
751                 <links>
752                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
753                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
754                 </links>
755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756             <actions>
757                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
758                 <retrieve/>
759                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
760                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
761             </actions>
762         </permacrud>
763         </class>
764
765         <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">
766                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
767                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
768                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
769                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
770                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
771                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
772                 </fields>
773                 <links>
774                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
775                 </links>
776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
777             <actions>
778                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
779                 <retrieve/>
780                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
781                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
782             </actions>
783         </permacrud>
784         </class>
785
786         <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">
787                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
788                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
789                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
790                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
791                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
792                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
793                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
794                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
795                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
796                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
797                 </fields>
798                 <links>
799                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
800                 </links>
801         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
802             <actions>
803                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
804                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
805                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
806                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
807             </actions>
808         </permacrud>
809         </class>
810
811     <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">
812         <fields oils_persist:primary="name">
813             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
814             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
815             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
816             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
817             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
818             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
819             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
820             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
821             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
822             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
823         </fields>
824         <links>
825             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
826             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
827         </links>
828         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
829             <actions>
830                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
831                 <retrieve/>
832                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
833                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
834             </actions>
835         </permacrud>
836     </class>
837
838     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
839         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
840             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
841             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
842             <field reporter:label="Name" name="name" reporter:datatype="text"/>
843             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
844             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
845             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
846             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
847         </fields>
848         <links>
849             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
850         </links>
851     </class>
852
853         <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">
854                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
855                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
856                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
857                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
858                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
859                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
860                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
861                 </fields>
862                 <links>
863             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
864             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
865                 </links>
866                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
867                         <actions>
868                                 <retrieve/>
869                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
870                         </actions>
871                 </permacrud>
872         </class>
873
874         <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">
875                 <fields oils_persist:primary="key">
876                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
877                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
878                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
879                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
880                 </fields>
881                 <links/>
882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
883                         <actions>
884                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
885                                 <retrieve/>
886                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
887                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
888                         </actions>
889                 </permacrud>
890         </class>
891
892         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
893                 <fields oils_persist:primary="module">
894                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
895                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
896                 </fields>
897                 <links/>
898         </class>
899
900         <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">
901                 <fields oils_persist:primary="module">
902                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
903                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
904                 </fields>
905                 <links/>
906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
907                         <actions>
908                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
909                                 <retrieve/>
910                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
911                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
912                         </actions>
913                 </permacrud>
914         </class>
915
916         <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">
917                 <fields oils_persist:primary="module">
918                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
919                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
920                 </fields>
921                 <links/>
922                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
923                         <actions>
924                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
925                                 <retrieve/>
926                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
927                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
928                         </actions>
929                 </permacrud>
930         </class>
931
932         <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">
933                 <fields oils_persist:primary="module">
934                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
935                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
936                 </fields>
937                 <links/>
938                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
939                         <actions>
940                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
941                                 <retrieve/>
942                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
943                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
944                         </actions>
945                 </permacrud>
946         </class>
947
948         <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">
949                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
950                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
951                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
952                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
953                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
954                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
955                 </fields>
956                 <links>
957                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
958                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
959                 </links>
960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
961                         <actions>
962                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
963                     <context link="event_def" field="owner"/>
964                 </create>
965                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
966                     <context link="event_def" field="owner"/>
967                 </retrieve>
968                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
969                     <context link="event_def" field="owner"/>
970                 </update>
971                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
972                     <context link="event_def" field="owner"/>
973                 </delete>
974                         </actions>
975                 </permacrud>
976         </class>
977
978         <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">
979                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
980                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
981                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
982                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
983                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
984                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
985                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
986                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
987                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
988                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
989                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
990                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
991                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
992                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
993                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
994                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
995                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
996                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
997                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
998                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
999                 </fields>
1000                 <links>
1001                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1002                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1003                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1004                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1005                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1006                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1007                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1008                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1009                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1010                 </links>
1011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1012                         <actions>
1013                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1014                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1015                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1016                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1017                         </actions>
1018                 </permacrud>
1019         </class>
1020
1021         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1022                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1023                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1024                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1025                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1026                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1027                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1028                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1029                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1030                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1031                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1032                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1033                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1034                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1035                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1036                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1037                 </fields>
1038                 <links>
1039                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1040                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1041                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1042                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1043                 </links>
1044         </class>
1045
1046         <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">
1047                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1048                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1049                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1050                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1051                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1052                 </fields>
1053                 <links>
1054                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1055                 </links>
1056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1057                         <actions>
1058                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1059                     <context link="event_def" field="owner"/>
1060                 </create>
1061                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1062                     <context link="event_def" field="owner"/>
1063                 </retrieve>
1064                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1065                     <context link="event_def" field="owner"/>
1066                 </update>
1067                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1068                     <context link="event_def" field="owner"/>
1069                 </delete>
1070                         </actions>
1071                 </permacrud>
1072         </class>
1073
1074         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1075                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1076                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1077                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1078                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1079                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1080                 </fields>
1081                 <links>
1082                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1083                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1084                 </links>
1085         </class>
1086
1087         <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">
1088                 <fields oils_persist:primary="code">
1089                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1090                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1091                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1092                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1093                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1094                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1095                 </fields>
1096                 <links/>
1097         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1098             <actions>
1099                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1100                 <retrieve/>
1101                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1102                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1103             </actions>
1104         </permacrud>
1105         </class>
1106
1107         <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">
1108                 <fields oils_persist:primary="code">
1109                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1110                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1111                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1112                 </fields>
1113                 <links/>
1114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1115             <actions>
1116                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1117                 <retrieve/>
1118                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1119                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1120             </actions>
1121         </permacrud>
1122         </class>
1123
1124         <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">
1125                 <fields oils_persist:primary="code">
1126                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1127                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1128                 </fields>
1129                 <links/>
1130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1131             <actions>
1132                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1133                 <retrieve/>
1134                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1135                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1136             </actions>
1137         </permacrud>
1138         </class>
1139
1140         <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">
1141                 <fields oils_persist:primary="code">
1142                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1143                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1144                 </fields>
1145                 <links/>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1149                 <retrieve/>
1150                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1151                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1152             </actions>
1153         </permacrud>
1154         </class>
1155
1156         <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">
1157                 <fields oils_persist:primary="code">
1158                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1159                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1160                 </fields>
1161                 <links/>
1162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1163             <actions>
1164                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1165                 <retrieve/>
1166                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1167                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1168             </actions>
1169         </permacrud>
1170         </class>
1171
1172         <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">
1173                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1174                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1175                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1176                 </fields>
1177                 <links/>
1178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1179             <actions>
1180                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1181                 <retrieve/>
1182                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1183                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1184             </actions>
1185         </permacrud>
1186         </class>
1187
1188         <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">
1189                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1190                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1191                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1192                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1193                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1194                 </fields>
1195         <links>
1196             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1197             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1198             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1199         </links>
1200         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1201             <actions>
1202                 <create permission="UPDATE_COPY">
1203                     <context link="target_copy" field="circ_lib"/>
1204                 </create>
1205                 <retrieve/>
1206                 <update permission="UPDATE_COPY">
1207                     <context link="target_copy" field="circ_lib"/>
1208                 </update>
1209                 <delete permission="UPDATE_COPY">
1210                     <context link="target_copy" field="circ_lib"/>
1211                 </delete>
1212             </actions>
1213         </permacrud>
1214         </class>
1215
1216         <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">
1217                 <fields oils_persist:primary="code">
1218                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1219                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1220                 </fields>
1221                 <links/>
1222         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1223             <actions>
1224                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1225                 <retrieve/>
1226                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1227                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1228             </actions>
1229         </permacrud>
1230         </class>
1231
1232         <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">
1233                 <fields oils_persist:primary="code">
1234                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1235                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1236                 </fields>
1237                 <links/>
1238         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1239             <actions>
1240                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1241                 <retrieve/>
1242                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1243                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1244             </actions>
1245         </permacrud>
1246         </class>
1247
1248         <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">
1249                 <fields oils_persist:primary="code">
1250                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1251                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1252                 </fields>
1253                 <links/>
1254         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1255             <actions>
1256                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1257                 <retrieve/>
1258                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1259                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1260             </actions>
1261         </permacrud>
1262         </class>
1263
1264     <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">
1265         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1266             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1267             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1268             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1269             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1270             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1271             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1272             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1273             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1274             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1275             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1276             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1277             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1278             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1279             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1280             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1281         </fields>
1282         <links/>
1283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1284             <actions>
1285                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1286                 <retrieve/>
1287                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1288                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1289             </actions>
1290         </permacrud>
1291     </class>
1292
1293     <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">
1294         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1295             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1296             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1297             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1298             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1299             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1300             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1301             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1302             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1303             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1304             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1305             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1306             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1307             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1308             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1309             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1310         </fields>
1311         <links/>
1312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1313             <actions>
1314                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1315                 <retrieve/>
1316                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1317                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1318             </actions>
1319         </permacrud>
1320     </class>
1321
1322     <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">
1323         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1324             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1325             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1326             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1327             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1328             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1329         </fields>
1330         <links>
1331             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1332             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1333             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1334         </links>
1335         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1336             <actions>
1337                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1338                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1339                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1340                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1341             </actions>
1342         </permacrud>
1343     </class>
1344
1345         <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">
1346                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1347                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1348                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1349                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1350                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1351                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1352                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1353                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1354                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1355                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1356                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1357                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1358                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1359                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1360                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1361                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1362                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1363             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1364                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1365                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1366                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1367                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1368                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1369                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1370                 </fields>
1371                 <links>
1372                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1373                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1374                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1375                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1376                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1377                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1378                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1379                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1380                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1381                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1382                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1383                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1384                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1385             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1386                 </links>
1387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1388             <actions>
1389                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1390                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1391                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1392                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1393             </actions>
1394         </permacrud>
1395         </class>
1396
1397         <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">
1398                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1399                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1400                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1401                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1402                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1403                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1404                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1405                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1406                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1407                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1408                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1409                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1410                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1411                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1412                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1413             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1414                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1415                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1416             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1417                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1418                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1419                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1420                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1421             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1422             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1423             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1424                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1425                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1426                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1427                 </fields>
1428                 <links>
1429                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1430                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1431                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1432                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1433                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1434                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1435                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1436                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1437                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1438                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1439                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1440                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1441                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1442             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1443                 </links>
1444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1445             <actions>
1446                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1447                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1448                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1449                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1450             </actions>
1451         </permacrud>
1452         </class>
1453
1454         <class id="ccmcmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test" oils_persist:tablename="config.circ_matrix_circ_mod_test" reporter:label="Circulation Matrix Circulation Modifier Subtest">
1455                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1456                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1457                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1458                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1459                 </fields>
1460                 <links>
1461                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1462                 </links>
1463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1464             <actions>
1465                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1466                     <context link="matchpoint" field="org_unit"/>
1467                 </create>
1468                 <retrieve/>
1469                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1470                     <context link="matchpoint" field="org_unit"/>
1471                 </update>
1472                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1473                     <context link="matchpoint" field="org_unit"/>
1474                 </delete>
1475             </actions>
1476         </permacrud>
1477         </class>
1478
1479         <class id="ccmcmtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test_map" oils_persist:tablename="config.circ_matrix_circ_mod_test_map" reporter:label="Circulation Matrix Circulation Modifier Subtest Circulation Modifier Set">
1480                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1481                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1482                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1483                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1484                 </fields>
1485                 <links>
1486                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1487                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1488                 </links>
1489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1490             <actions>
1491                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1492                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1493                 </create>
1494                 <retrieve/>
1495                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1496                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1497                 </update>
1498                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1499                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1500                 </delete>
1501             </actions>
1502         </permacrud>
1503         </class>
1504
1505         <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">
1506                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1507                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1508                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1509                 </fields>
1510                 <links/>
1511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1512             <actions>
1513                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1514                 <retrieve/>
1515                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1516                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1517             </actions>
1518         </permacrud>
1519         </class>
1520
1521         <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">
1522                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1523                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1524                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1525                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1526                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1527                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1528                 </fields>
1529                 <links>
1530                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1531                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1532                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1533                 </links>
1534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1535             <actions>
1536                 <create permission="ADMIN_SURVEY">
1537                     <context link="survey" field="owner"/>
1538                 </create>
1539                 <retrieve/>
1540                 <update permission="ADMIN_SURVEY">
1541                     <context link="survey" field="owner"/>
1542                 </update>
1543                 <delete permission="ADMIN_SURVEY">
1544                     <context link="survey" field="owner"/>
1545                 </delete>
1546             </actions>
1547         </permacrud>
1548         </class>
1549         <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">
1550                 <fields oils_persist:primary="id" oils_persist:sequence="">
1551                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1552                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1553                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1554                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1555                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1556                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1557                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1558                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1559                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1560                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1561                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1562                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1563                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1564                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1565                 </fields>
1566                 <links>
1567                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1568                 </links>
1569         </class>
1570         <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">
1571                 <fields oils_persist:primary="id" oils_persist:sequence="">
1572                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1573                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1574                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1575                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1576                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1577                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1578                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1579                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1580                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1581                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1582                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1583                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1584                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1585                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1586                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1587                 </fields>
1588                 <links>
1589                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1590                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1591                 </links>
1592         </class>
1593         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1594                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1595                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1596                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1597                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1598                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1599                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1600                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1601                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1602                 </fields>
1603                 <links>
1604                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1605                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1606                 </links>
1607         </class>
1608         <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">
1609                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1610                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1611                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1612                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1613                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1614                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1615                 </fields>
1616                 <links>
1617                         <link field="usr" reltype="has_a" key="id" class="au"/>
1618                 </links>
1619         </class>
1620         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1621                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1622                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1623                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1624                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1625                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1626                 </fields>
1627                 <links>
1628                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1629                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1630                 </links>
1631         </class>
1632         <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">
1633                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1634                         <field name="field" reporter:datatype="link"/>
1635                         <field name="id" reporter:datatype="id" />
1636                         <field name="source" reporter:datatype="link"/>
1637                         <field name="value" reporter:datatype="text"/>
1638                 </fields>
1639                 <links>
1640                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1641                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1642                 </links>
1643         </class>
1644         <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">
1645                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1646                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1647                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1648                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1649                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1650                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1651                 </fields>
1652                 <links>
1653                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1654                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1655                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1656                 </links>
1657         </class>
1658         <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">
1659                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1660                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1661                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1662                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1663                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1664                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1665                 </fields>
1666                 <links>
1667                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1668                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1669                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1670                 </links>
1671         </class>
1672         <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">
1673                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1674                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1675                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1676                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1677                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1678                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1679                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1680                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1681                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1682                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1683                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1684                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1685                 </fields>
1686                 <links>
1687                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1688                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1689                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1690                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1691                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1692                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1693                 </links>
1694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1695             <actions>
1696                 <create permission="TRANSIT_COPY" context_field="owner">
1697                     <context link="target_copy" field="circ_lib"/>
1698                 </create>
1699                 <retrieve/>
1700                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1701                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1702             </actions>
1703         </permacrud>
1704         </class>
1705         <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">
1706                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1707                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1708                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1709                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1710                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1711                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1712                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1713                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1714                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1715                 </fields>
1716                 <links>
1717                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1718                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1719                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1720                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1721                 </links>
1722         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1723             <actions>
1724                 <create permission="ADMIN_SURVEY">
1725                     <context link="survey" field="owner"/>
1726                 </create>
1727                 <retrieve/>
1728                 <update permission="ADMIN_SURVEY">
1729                     <context link="survey" field="owner"/>
1730                 </update>
1731                 <delete permission="ADMIN_SURVEY">
1732                     <context link="survey" field="owner"/>
1733                 </delete>
1734             </actions>
1735         </permacrud>
1736         </class>
1737         <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">
1738                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1739                         <field name="bucket" />
1740                         <field name="id" reporter:datatype="id" />
1741                         <field name="target_copy" reporter:datatype="link"/>
1742                         <field name="create_time" reporter:datatype="timestamp" />
1743                         <field name="pos" reporter:datatype="int" />
1744                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1745                 </fields>
1746                 <links>
1747                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1748                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1749             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1750                 </links>
1751         </class>
1752         <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">
1753                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1754                         <field name="id" reporter:datatype="id" />
1755                         <field name="item" reporter:datatype="link"/>
1756                         <field name="note" reporter:datatype="text" />
1757                 </fields>
1758                 <links>
1759                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1760                 </links>
1761         </class>
1762
1763         <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">
1764                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1765                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1766                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1767                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1768                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1769                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1770                 </fields>
1771                 <links>
1772                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1773                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1774                 </links>
1775                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1776                         <actions>
1777                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1778                                 <retrieve/>
1779                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1780                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1781                         </actions>
1782                 </permacrud>
1783         </class>
1784
1785         <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">
1786                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
1787                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1788                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
1789                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1790                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1791                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
1792                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1793                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1794                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
1795                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1796                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1797                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
1798                 </fields>
1799                 <links>
1800                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
1801                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1802                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
1803                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1804                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
1805                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
1806                 </links>
1807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1808                         <actions>
1809                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1810                                 <retrieve/>
1811                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1812                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1813                         </actions>
1814                 </permacrud>
1815         </class>
1816
1817         <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">
1818                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
1819                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1820                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
1821                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1822                 </fields>
1823                 <links>
1824                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
1825                 </links>
1826                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1827                         <actions>
1828                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1829                                 <retrieve/>
1830                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1831                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1832                         </actions>
1833                 </permacrud>
1834         </class>
1835
1836         <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">
1837                 <fields oils_persist:primary="code">
1838                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
1839                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1840                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1841                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1842                 </fields>
1843                 <links>
1844                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1845                 </links>
1846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1847                         <actions>
1848                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1849                                 <retrieve/>
1850                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1851                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1852                         </actions>
1853                 </permacrud>
1854         </class>
1855
1856         <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">
1857                 <fields oils_persist:primary="code">
1858                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
1859                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
1860                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
1861                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
1862                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1863                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
1864                 </fields>
1865                 <links>
1866                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
1867                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
1868                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
1869                 </links>
1870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1871                         <actions>
1872                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1873                                 <retrieve/>
1874                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1875                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1876                         </actions>
1877                 </permacrud>
1878         </class>
1879
1880     <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">
1881         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
1882             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
1883             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
1884             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
1885         </fields>
1886         <links>
1887             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
1888             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
1889         </links>
1890         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1891             <actions>
1892                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1893                 <retrieve/>
1894                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1895                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1896             </actions>
1897         </permacrud>
1898     </class>
1899
1900         <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">
1901                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1902                         <field name="active" reporter:datatype="bool"/>
1903                         <field name="create_date" reporter:datatype="timestamp"/>
1904                         <field name="creator" />
1905                         <field name="deleted" reporter:datatype="bool"/>
1906                         <field name="edit_date" reporter:datatype="timestamp"/>
1907                         <field name="editor" />
1908                         <field name="id" reporter:datatype="id" />
1909                         <field name="last_xact_id" />
1910                         <field name="marc" />
1911                         <field name="source" />
1912                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1913                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1914                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1915                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1916                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1917                 </fields>
1918                 <links>
1919                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1920                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1921                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1922                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1923                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1924                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1925                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1926                 </links>
1927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1928                         <actions>
1929                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1930                                 <retrieve/>
1931                                 <update permission="UPDATE_MARC" global_required="true"/>
1932                                 <delete permission="UPDATE_MARC" global_required="true"/>
1933                         </actions>
1934                 </permacrud>
1935         </class>
1936         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1937                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1938                         <field name="char_encoding" />
1939                         <field name="id" />
1940                         <field name="record" />
1941                         <field name="record_status" />
1942                         <field name="thesaurus" />
1943                 </fields>
1944                 <links>
1945                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1946                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
1947                 </links>
1948         </class>
1949         <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">
1950                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1951                         <field name="id" reporter:datatype="id" />
1952                         <field name="bib" reporter:datatype="link" />
1953                         <field name="authority" reporter:datatype="link" />
1954                 </fields>
1955                 <links>
1956                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1957                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1958                 </links>
1959         </class>
1960         <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">
1961                 <fields oils_persist:primary="code" oils_persist:sequence="">
1962                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1963                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1964                 </fields>
1965                 <links/>
1966         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1967             <actions>
1968                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1969                 <retrieve/>
1970                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1971                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1972             </actions>
1973         </permacrud>
1974         </class>
1975         <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">
1976                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1977                         <field name="accepting_usr" />
1978                         <field name="amount" reporter:datatype="money" />
1979                         <field name="amount_collected" reporter:datatype="money" />
1980                         <field name="approval_code" reporter:datatype="text"/>
1981                         <field name="cash_drawer" reporter:datatype="link"/>
1982                         <field name="cc_first_name" reporter:datatype="text"/>
1983                         <field name="cc_last_name" reporter:datatype="text"/>
1984                         <field name="cc_number" reporter:datatype="text"/>
1985                         <field name="cc_order_number" reporter:datatype="text"/>
1986                         <field name="cc_type" reporter:datatype="text"/>
1987                         <field name="cc_processor" reporter:datatype="text"/>
1988                         <field name="expire_month" reporter:datatype="int" />
1989                         <field name="expire_year" reporter:datatype="int" />
1990                         <field name="id" reporter:datatype="id" />
1991                         <field name="note" reporter:datatype="text"/>
1992                         <field name="payment_ts" reporter:datatype="timestamp"/>
1993                         <field name="xact" reporter:datatype="link"/>
1994                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1995                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1996                 </fields>
1997                 <links>
1998                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1999                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2000                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2001                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2002                 </links>
2003         </class>
2004         <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">
2005                 <fields oils_persist:primary="name">
2006                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2007                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2008                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2009                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2010                 </fields>
2011                 <links/>
2012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2013             <actions>
2014                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2015                 <retrieve/>
2016                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2017                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2018             </actions>
2019         </permacrud>
2020         </class>
2021
2022         <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">
2023                 <fields oils_persist:primary="alias">
2024                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2025                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2026                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2027                 </fields>
2028                 <links>
2029                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2030                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2031                 </links>
2032         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2033             <actions>
2034                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2035                 <retrieve/>
2036                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2037                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2038             </actions>
2039         </permacrud>
2040         </class>
2041
2042         <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">
2043                 <fields oils_persist:primary="name">
2044                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2045                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2046                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2047                 </fields>
2048                 <links>
2049                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2050                 </links>
2051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2052             <actions>
2053                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2054                 <retrieve/>
2055                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2056                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2057             </actions>
2058         </permacrud>
2059         </class>
2060
2061         <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">
2062                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2063                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2064                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2065                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2066                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2067                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2068                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2069                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2070                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2071                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2072                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2073                 </fields>
2074                 <links>
2075                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2076                 </links>
2077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2078             <actions>
2079                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2080                 <retrieve/>
2081                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2082                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2083             </actions>
2084         </permacrud>
2085         </class>
2086         <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">
2087                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2088                         <field name="id" reporter:datatype="id" />
2089                         <field name="name" reporter:datatype="text"/>
2090                         <field name="xpath" reporter:datatype="text"/>
2091                         <field name="format" reporter:datatype="link"/>
2092                         <field name="first_word" reporter:datatype="bool" />
2093                 </fields>
2094                 <links/>
2095         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2096             <actions>
2097                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2098                 <retrieve/>
2099                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2100                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2101             </actions>
2102         </permacrud>
2103         </class>
2104         <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">
2105                 <fields oils_persist:primary="code" oils_persist:sequence="">
2106                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2107                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2108                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2109                 </fields>
2110                 <links/>
2111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2112             <actions>
2113                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2114                 <retrieve/>
2115                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2116                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2117             </actions>
2118         </permacrud>
2119         </class>
2120         <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">
2121                 <fields oils_persist:primary="code" oils_persist:sequence="">
2122                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2123                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2124                 </fields>
2125                 <links/>
2126         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2127             <actions>
2128                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2129                 <retrieve/>
2130                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2131                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2132             </actions>
2133         </permacrud>
2134         </class>
2135     <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">
2136         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2137             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
2138             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2139             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2140             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2141         </fields>
2142         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2143             <actions>
2144                 <retrieve/>
2145             </actions>
2146         </permacrud>
2147     </class>
2148         <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">
2149                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2150                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2151                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2152                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2153                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2154                 </fields>
2155                 <links>
2156                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2157                 </links>
2158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2159             <actions>
2160                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2161                 <retrieve/>
2162                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2163                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2164             </actions>
2165         </permacrud>
2166         </class>
2167         <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">
2168                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2169                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2170                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2171                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2172                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2173                 </fields>
2174                 <links>
2175                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2176                 </links>
2177         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2178             <actions>
2179                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2180                 <retrieve/>
2181                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2182                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2183             </actions>
2184         </permacrud>
2185         </class>
2186         <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">
2187                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2188                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2189                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2190                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2191                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2192                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2193                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2194                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2195                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2196                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2197                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2198                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2199                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2200                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2201                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2202                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2203                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2204                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2205                 </fields>
2206                 <links>
2207                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2208                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2209                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2210                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2211                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2212                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2213                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2214                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2215                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2216                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2217                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2218                 </links>
2219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2220             <actions>
2221                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2222                 <retrieve/>
2223                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2224                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2225             </actions>
2226         </permacrud>
2227         </class>
2228         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2229                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2230                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2231                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2232                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2233                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2234                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2235                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2236                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2237                 </fields>
2238                 <links>
2239                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2240                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2241         </links>
2242         </class>
2243         <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">
2244                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2245                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2246                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2247                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2248                 </fields>
2249                 <links>
2250                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2251                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2252                 </links>
2253         </class>
2254         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2255                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2256                         <field name="id" reporter:datatype="id" />
2257                         <field name="value" oils_persist:i18n="true" />
2258                 </fields>
2259                 <links/>
2260         </class>
2261         <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">
2262                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2263                         <field name="balance_owed" reporter:datatype="money" />
2264                         <field name="total_owed" reporter:datatype="money" />
2265                         <field name="total_paid" reporter:datatype="money" />
2266                         <field name="usr" reporter:datatype="link"/>
2267                 </fields>
2268                 <links>
2269                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2270         </links>
2271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2272             <actions>
2273                 <retrieve permission="VIEW_USER">
2274                     <context link="usr" field="home_ou"/>
2275                 </retrieve>
2276             </actions>
2277         </permacrud>
2278         </class>
2279         <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">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2281                         <field name="collector" />
2282                         <field name="enter_time" reporter:datatype="timestamp"/>
2283                         <field name="id" reporter:datatype="id" />
2284                         <field name="location" reporter:datatype="link"/>
2285                         <field name="usr" reporter:datatype="link"/>
2286                 </fields>
2287                 <links>
2288                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2289                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2290                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2291                 </links>
2292         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2293             <actions>
2294                 <create permission="money.collections_tracker.create" context_field="location"/>
2295                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2296                 <delete permission="money.collections_tracker.create" context_field="location"/>
2297             </actions>
2298         </permacrud>
2299         </class>
2300         <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">
2301                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2302                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2303                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2304                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2305                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2306                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2307                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2308                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2309                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2310                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2311                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2312                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2313                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2314                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2315                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2316                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2317                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2318                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2319                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2320                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2321                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2322                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2323                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2324                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2325                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2326                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2327                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2328                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2329                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2330                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2331                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2332                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2333                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2334                 </fields>
2335                 <links>
2336                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2337                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2338                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2339                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2340                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2341                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2342                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2343                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2344                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2345                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2346                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2347                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2348                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2349                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2350                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2351                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2352                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2353                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2354                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2355                 </links>
2356         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2357             <actions>
2358                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2359                 <retrieve/>
2360                 <update permission="UPDATE_MARC" global_required="true"/>
2361             </actions>
2362         </permacrud>
2363         </class>
2364         <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">
2365                 <fields oils_persist:primary="id">
2366                         <field name="dow_0_close" />
2367                         <field name="dow_0_open" />
2368                         <field name="dow_1_close" />
2369                         <field name="dow_1_open" />
2370                         <field name="dow_2_close" />
2371                         <field name="dow_2_open" />
2372                         <field name="dow_3_close" />
2373                         <field name="dow_3_open" />
2374                         <field name="dow_4_close" />
2375                         <field name="dow_4_open" />
2376                         <field name="dow_5_close" />
2377                         <field name="dow_5_open" />
2378                         <field name="dow_6_close" />
2379                         <field name="dow_6_open" />
2380                         <field name="id" reporter:datatype="id" />
2381                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2382                 </fields>
2383                 <links>
2384                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2385                 </links>
2386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2387             <actions>
2388                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2389                 <retrieve/>
2390                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2391                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2392             </actions>
2393         </permacrud>
2394         </class>
2395         <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">
2396                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2397                         <field name="id" reporter:datatype="id" />
2398                         <field name="record" reporter:datatype="link"/>
2399                         <field name="label" reporter:datatype="text"/>
2400                         <field name="label_sortkey" reporter:datatype="text"/>
2401                 </fields>
2402                 <links>
2403                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2404                 </links>
2405         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2406             <actions>
2407                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2408                 <retrieve/>
2409                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2410                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2411             </actions>
2412         </permacrud>
2413         </class>
2414         <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">
2415                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2416                         <field name="id" reporter:datatype="id" />
2417                         <field name="target_copy" reporter:datatype="link" />
2418                         <field name="part" reporter:datatype="link"/>
2419                 </fields>
2420                 <links>
2421                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2422                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2423                 </links>
2424         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2425             <actions>
2426                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2427                 <retrieve/>
2428                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2429                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2430             </actions>
2431         </permacrud>
2432         </class>
2433         <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">
2434                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2435                         <field name="close_end" reporter:datatype="timestamp" />
2436                         <field name="close_start" reporter:datatype="timestamp" />
2437                         <field name="id" reporter:datatype="id" />
2438                         <field name="org_unit" reporter:datatype="org_unit"/>
2439                         <field name="reason" reporter:datatype="text"/>
2440                 </fields>
2441                 <links>
2442                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2443                 </links>
2444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2445             <actions>
2446                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2447                 <retrieve/>
2448                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2449                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2450             </actions>
2451         </permacrud>
2452         </class>
2453         <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">
2454                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2455                         <field name="extended" reporter:datatype="interval"/>
2456                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2457                         <field name="max_renewals" reporter:datatype="int" />
2458                         <field name="name" reporter:datatype="text"/>
2459                         <field name="normal" reporter:datatype="interval"/>
2460                         <field name="shrt" reporter:datatype="interval"/>
2461                 </fields>
2462                 <links>
2463                 </links>
2464         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2465             <actions>
2466                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2467                 <retrieve/>
2468                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2469                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2470             </actions>
2471         </permacrud>
2472         </class>
2473
2474         <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">
2475                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2476                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2477                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2478             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2479                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2480             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2481                 </fields>
2482                 <links>
2483             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2484                 </links>
2485                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2486             <actions>
2487                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2488                 <retrieve/>
2489                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2490                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2491             </actions>
2492                 </permacrud>
2493         </class>
2494
2495         <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">
2496                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2497                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2498                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2499                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2500             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2501                 </fields>
2502                 <links>
2503                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2504                 </links>
2505                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2506             <actions>
2507                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2508                 <retrieve/>
2509                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2510                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2511             </actions>
2512                 </permacrud>
2513         </class>
2514
2515         <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">
2516                 <fields oils_persist:primary="id" oils_persist:sequence="">
2517                         <field name="balance_owed" reporter:datatype="money"/>
2518                         <field name="id" reporter:datatype="id" />
2519                         <field name="last_billing_note" reporter:datatype="text"/>
2520                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2521                         <field name="last_billing_type" reporter:datatype="text"/>
2522                         <field name="last_payment_note" reporter:datatype="text"/>
2523                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2524                         <field name="last_payment_type" reporter:datatype="text"/>
2525                         <field name="total_owed" reporter:datatype="money"/>
2526                         <field name="total_paid" reporter:datatype="money"/>
2527                         <field name="usr" reporter:datatype="link"/>
2528                         <field name="xact_finish" reporter:datatype="timestamp" />
2529                         <field name="xact_start" reporter:datatype="timestamp" />
2530                         <field name="xact_type" reporter:datatype="text"/>
2531                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2532                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2533                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2534                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2535                         <field name="billing_location" reporter:datatype="link"/>
2536                 </fields>
2537                 <links>
2538                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2539                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2540                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2541                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2542                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2543                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2544                 </links>
2545         </class>
2546         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2547                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2548                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2549                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2550                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2551                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2552                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2553                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2554                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2555                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2556                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2557                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2558                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2559                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2560                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2561                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2562                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2563                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2564                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2565                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2566                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2567                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2568                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2569                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2570                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2571                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2572                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2573                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2574                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2575                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2576                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2577                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2578                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2579                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2580                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2581                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2582                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2583                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2584                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2585                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2586                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2587                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2588                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2589                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2590                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2591                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2592                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2593                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2594                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2595                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2596                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2597                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2598                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2599                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2600                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2601                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2602                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2603                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2604                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2605                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2606                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2607                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2608                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2609                 </fields>
2610                 <links>
2611                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2612                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2613                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2614                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2615                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2616                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2617                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2618                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2619                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2620                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2621                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2622                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2623                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2624                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2625                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2626                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2627                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2628                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2629                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2630                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2631                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2632                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2633                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2634                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2635                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2636                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2637                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2638                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2639                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2640                 </links>
2641         </class>
2642
2643         <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">
2644                 <fields oils_persist:primary="name">
2645                         <field name="name" reporter:datatype="text"/>
2646                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2647                 </fields>
2648                 <links/>
2649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2650                         <actions>
2651                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2652                                 <retrieve/>
2653                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2654                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2655                         </actions>
2656                 </permacrud>
2657         </class>
2658         <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">
2659                 <fields oils_persist:primary="name">
2660                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2661                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2662                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2663                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2664                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2665                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2666                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2667                 </fields>
2668                 <links>
2669                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2670                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2671                 </links>
2672                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2673                         <actions>
2674                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2675                                 <retrieve/>
2676                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2677                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2678                         </actions>
2679                 </permacrud>
2680         </class>
2681         <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">
2682                 <fields oils_persist:primary="name">
2683                         <field name="name" reporter:datatype="text"/>
2684                         <field name="label" reporter:datatype="text"/>
2685                         <field name="description" reporter:datatype="text"/>
2686                         <field name="datatype" reporter:datatype="text"/>
2687                         <field name="view_perm" reporter:datatype="link"/>
2688                         <field name="update_perm" reporter:datatype="link"/>
2689                         <field name="fm_class" reporter:datatype="text"/>
2690                         <field name="grp" reporter:datatype="link"/>
2691                 </fields>
2692                 <links>
2693                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2694                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2695                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2696                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2697                 </links>
2698                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2699                         <actions>
2700                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2701                                 <retrieve/>
2702                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2703                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2704                         </actions>
2705                 </permacrud>
2706         </class>
2707         <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">
2708                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2709                         <field name="id" />
2710                         <field name="name"  reporter:datatype="text"/>
2711                         <field name="org_unit" reporter:datatype="org_unit"/>
2712                         <field name="value"  reporter:datatype="text"/>
2713                 </fields>
2714                 <links>
2715                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2716                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2717                 </links>
2718         </class>
2719         <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">
2720                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2721                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2722                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2723                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2724                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2725                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2726                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2727                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2728                 </fields>
2729                 <links>
2730                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2731                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2732                 </links>
2733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2734             <actions>
2735                 <create permission="CREATE_COPY_NOTE">
2736                     <context link="owning_copy" field="circ_lib"/>
2737                 </create>
2738                 <retrieve permission="VIEW_COPY_NOTES">
2739                     <context link="owning_copy" field="circ_lib"/>
2740                 </retrieve>
2741                 <update permission="UPDATE_COPY_NOTE">
2742                     <context link="owning_copy" field="circ_lib"/>
2743                 </update>
2744                 <delete permission="DELETE_COPY_NOTE">
2745                     <context link="owning_copy" field="circ_lib"/>
2746                 </delete>
2747             </actions>
2748         </permacrud>
2749         </class>
2750         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2751                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2752                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2753                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2754                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2755                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2756                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2757                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2758                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2759                 </fields>
2760                 <links>
2761                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2762                 </links>
2763         </class>
2764         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2765                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2766                         <field name="fingerprint"  reporter:datatype="text"/>
2767                         <field name="id" reporter:datatype="id" />
2768                         <field name="master_record" reporter:datatype="link"/>
2769                         <field name="mods"  reporter:datatype="text"/>
2770                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2771                 </fields>
2772                 <links>
2773                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2774                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2775                 </links>
2776         </class>
2777         <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">
2778                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2779                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2780                         <field name="name"  reporter:datatype="text"/>
2781                 </fields>
2782                 <links/>
2783         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2784             <actions>
2785                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2786                 <retrieve/>
2787                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2788                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2789             </actions>
2790         </permacrud>
2791         </class>
2792         <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">
2793                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2794                         <field name="code"  reporter:datatype="text"/>
2795                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2796                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2797                 </fields>
2798                 <links/>
2799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2800             <actions>
2801                 <create permission="CREATE_PERM" global_required="true"/>
2802                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2803                 <update permission="UPDATE_PERM" global_required="true"/>
2804                 <delete permission="DELETE_PERM" global_required="true"/>
2805             </actions>
2806         </permacrud>
2807         </class>
2808         <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">
2809                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2810                         <field name="id" reporter:datatype="id" />
2811                         <field name="metarecord" reporter:datatype="link"/>
2812                         <field name="source" reporter:datatype="link"/>
2813                 </fields>
2814                 <links>
2815                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2816                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2817                 </links>
2818         </class>
2819         <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">
2820                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2821                         <field name="id" reporter:datatype="id" />
2822                         <field name="field" reporter:datatype="link"/>
2823                         <field name="source" reporter:datatype="link"/>
2824                         <field name="value"  reporter:datatype="text"/>
2825                 </fields>
2826                 <links>
2827                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2828                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2829                 </links>
2830         </class>
2831         <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">
2832                 <oils_persist:source_definition>
2833                         SELECT * FROM metabib.author_field_entry
2834                                                 UNION ALL
2835                         SELECT * FROM metabib.keyword_field_entry
2836                                                 UNION ALL
2837                         SELECT * FROM metabib.identifier_field_entry
2838                                                 UNION ALL
2839                         SELECT * FROM metabib.title_field_entry
2840                                                 UNION ALL
2841                         SELECT * FROM metabib.subject_field_entry
2842                                                 UNION ALL
2843                         SELECT * FROM metabib.series_field_entry
2844                 </oils_persist:source_definition>
2845                 <fields>
2846                         <field name="field" reporter:datatype="link"/>
2847                         <field name="id" reporter:datatype="id" />
2848                         <field name="source" reporter:datatype="link"/>
2849                         <field name="value"  reporter:datatype="text"/>
2850                 </fields>
2851                 <links>
2852                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2853                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2854                 </links>
2855         </class>
2856         <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">
2857                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2858                         <field name="field" reporter:datatype="link"/>
2859                         <field name="id" reporter:datatype="id" />
2860                         <field name="source" reporter:datatype="link"/>
2861                         <field name="value"  reporter:datatype="text"/>
2862                 </fields>
2863                 <links>
2864                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2865                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2866                 </links>
2867         </class>
2868         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2869                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2870                         <field name="accepting_usr" reporter:datatype="link"/>
2871                         <field name="amount" reporter:datatype="money" />
2872                         <field name="amount_collected" reporter:datatype="money" />
2873                         <field name="cash_drawer" reporter:datatype="link"/>
2874                         <field name="id" reporter:datatype="id" />
2875                         <field name="note"  reporter:datatype="text"/>
2876                         <field name="payment_ts" reporter:datatype="timestamp"/>
2877                         <field name="xact" reporter:datatype="link"/>
2878                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2879                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2880                 </fields>
2881                 <links>
2882                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2883                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2884                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2885                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2886                 </links>
2887         </class>
2888         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2889                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2890                         <field name="accepting_usr" reporter:datatype="link"/>
2891                         <field name="amount" reporter:datatype="money" />
2892                         <field name="amount_collected" reporter:datatype="money" />
2893                         <field name="id" reporter:datatype="id" />
2894                         <field name="note"  reporter:datatype="text"/>
2895                         <field name="payment_ts" reporter:datatype="timestamp"/>
2896                         <field name="xact" reporter:datatype="link"/>
2897                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2898                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2899                 </fields>
2900                 <links>
2901                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2902                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2903                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2904                 </links>
2905         </class>
2906         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2907                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2908                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2909                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2910                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2911                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2912                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2913                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2914                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2915                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2916                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2917                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2918                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2919                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2920                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2921                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2922                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2923                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2924                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2925                 </fields>
2926                 <links>
2927                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2928                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2929                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2930                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2931                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2932                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2933                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2934                 </links>
2935         </class>
2936
2937         <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">
2938                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2939                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2940                         <field name="name"  reporter:datatype="text"/>
2941                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2942                         <field name="block_list" reporter:datatype="text"/>
2943                         <field name="org_depth" reporter:datatype="int"/>
2944                 </fields>
2945                 <links/>
2946         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2947             <actions>
2948                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2949                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2950                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2951                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2952             </actions>
2953         </permacrud>
2954         </class>
2955         <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">
2956                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2957                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2958                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2959                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2960                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2961                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2962                 </fields>
2963                 <links>
2964                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2965                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2966                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2967         </links>
2968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2969             <actions>
2970                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2971                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2972                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2973                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2974             </actions>
2975         </permacrud>
2976         </class>
2977         <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">
2978                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2979                         <field name="holdable" reporter:datatype="bool"/>
2980                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2981                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2982                         <field name="opac_visible" reporter:datatype="bool"/>
2983             <field name="copy_active" reporter:datatype="bool"/>
2984                 </fields>
2985                 <links/>
2986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2987             <actions>
2988                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2989                 <retrieve/>
2990                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2991                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2992             </actions>
2993         </permacrud>
2994         </class>
2995         <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">
2996                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2997                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2998                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2999                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3000                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3001                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3002                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3003                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3004                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3005                 </fields>
3006                 <links>
3007                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3008                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3009                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3010                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3011                 </links>
3012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3013                         <actions>
3014                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3015                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3016                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3017                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3018                         </actions>
3019                 </permacrud>
3020         </class>
3021         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3022                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3023                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3024                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3025                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3026                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3027                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3028                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3029                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3030                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3031                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3032                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3033                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3034                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3035                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3036                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3037                 </fields>
3038                 <links>
3039                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3040                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3041                 </links>
3042         </class>
3043
3044         <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">
3045                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3046                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3047                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3048                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3049                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3050                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3051                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3052                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3053                 </fields>
3054                 <links>
3055                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3056                 </links>
3057         </class>
3058
3059         <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">
3060                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3061                         <field name="call_number" />
3062                         <field name="create_date" reporter:datatype="timestamp"/>
3063                         <field name="creator" reporter:datatype="link"/>
3064                         <field name="id" reporter:datatype="id" />
3065                         <field name="pub" reporter:datatype="bool"/>
3066                         <field name="title"  reporter:datatype="text"/>
3067                         <field name="value"  reporter:datatype="text"/>
3068                 </fields>
3069                 <links>
3070                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3071                 </links>
3072         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3073             <actions>
3074                 <create permission="CREATE_VOLUME_NOTE">
3075                     <context link="call_number" field="owning_lib"/>
3076                 </create>
3077                 <retrieve permission="VIEW_VOLUME_NOTES">
3078                     <context link="call_number" field="owning_lib"/>
3079                 </retrieve>
3080                 <update permission="UPDATE_VOLUME_NOTE">
3081                     <context link="call_number" field="owning_lib"/>
3082                 </update>
3083                 <delete permission="DELETE_VOLUME_NOTE">
3084                     <context link="call_number" field="owning_lib"/>
3085                 </delete>
3086             </actions>
3087         </permacrud>
3088         </class>
3089         <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">
3090                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3091                         <field name="create_date" reporter:datatype="timestamp"/>
3092                         <field name="creator" reporter:datatype="link"/>
3093                         <field name="edit_date" reporter:datatype="timestamp"/>
3094                         <field name="editor" reporter:datatype="link"/>
3095                         <field name="id" reporter:datatype="id" />
3096                         <field name="record" reporter:datatype="link"/>
3097                         <field name="value" reporter:datatype="text"/>
3098                 </fields>
3099                 <links>
3100                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3101                 </links>
3102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3103             <actions>
3104                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3105                 <retrieve/>
3106                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3107                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3108             </actions>
3109         </permacrud>
3110         </class>
3111         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3112         <oils_persist:source_definition>
3113 SELECT  usr,
3114         SUM(
3115             CASE
3116                 WHEN (
3117                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3118                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3119                 ) THEN 1
3120                 ELSE 0
3121             END
3122         ) AS out,
3123
3124         SUM(
3125             CASE
3126                 WHEN (
3127                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3128                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3129                 ) THEN 1
3130                 ELSE 0
3131             END
3132         ) AS overdue,
3133
3134         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3135         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3136         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3137   FROM  action.circulation
3138   WHERE checkin_time IS NULL
3139   GROUP BY 1
3140         </oils_persist:source_definition>
3141         <fields oils_persist:primary="usr">
3142             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3143             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3144             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3145             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3146             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3147             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3148         </fields>
3149         <links>
3150             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3151         </links>
3152         </class>
3153         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3154         <oils_persist:source_definition>
3155 SELECT  usr,
3156         ARRAY_TO_STRING(ARRAY_ACCUM(
3157             CASE
3158                 WHEN (
3159                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3160                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3161                 ) THEN id
3162                 ELSE 0
3163             END
3164         ),',') AS out,
3165
3166         ARRAY_TO_STRING(ARRAY_ACCUM(
3167             CASE
3168                 WHEN (
3169                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3170                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3171                 ) THEN id
3172                 ELSE 0
3173             END
3174         ),',') AS overdue,
3175
3176         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3177         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3178         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3179   FROM  action.circulation
3180   WHERE checkin_time IS NULL
3181   GROUP BY 1
3182         </oils_persist:source_definition>
3183         <fields oils_persist:primary="usr">
3184             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3185             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3186             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3187             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3188             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3189             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3190         </fields>
3191         <links>
3192             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3193         </links>
3194         </class>
3195         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3196                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3197                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3198                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3199                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3200                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3201                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3202                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3203                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3204                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3205                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3206                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3207                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3208                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3209                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3210                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3211                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3212                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3213                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3214                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3215                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3216                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3217                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3218                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3219                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3220                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3221                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3222                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3223                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3224                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3225                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3226                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3227                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3228                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3229                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3230                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3231                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3232                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3233                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3234                 </fields>
3235                 <links>
3236                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3237                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3238                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3239                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3240                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3241                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3242                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3243                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3244                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3245                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3246                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3247                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3248                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3249                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3250                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3251                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3252                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3253                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3254                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3255                 </links>
3256         </class>
3257         <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">
3258                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3259                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3260                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3261                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3262                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3263                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3264                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3265                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3266                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3267                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3268                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3269                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3270                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3271                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3272                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3273                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3274                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3275                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3276                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3277                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3278                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3279                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3280                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3281                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3282                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3283                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3284                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3285                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3286                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3287                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3288                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3289                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3290                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3291                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3292                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3293                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3294                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3295                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3296                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3297                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3298                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3299                 </fields>
3300                 <links>
3301                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3302                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3303                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3304                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3305                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3306                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3307                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3308                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3309                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3310                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3311                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3312                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3313                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3314                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3315                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3316                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3317                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3318                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3319                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3320                 </links>
3321         </class>
3322         <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">
3323                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3324                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3325                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3326                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3327                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3328                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3329                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3330                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3331                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3332                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3333                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3334                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3335                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3336                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3337                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3338                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3339                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3340                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3341                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3342                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3343                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3344                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3345                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3346                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3347                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3348                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3349                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3350                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3351                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3352                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3353                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3354                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3355                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3356                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3357                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3358                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3359                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3360                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3361                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3362                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3363                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3364                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3365                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3366                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3367                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3368                 </fields>
3369                 <links>
3370                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3371                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3372                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3373                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3374                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3375                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3376                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3377                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3378                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3379                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3380                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3381                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3382                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3383                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3384                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3385                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3386                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3387                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3388                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3389                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3390                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3391                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3392                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3393                 </links>
3394         </class>
3395
3396         <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">
3397                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3398                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3399                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3400                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3401                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3402                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3403                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3404                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3405                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3406                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3407                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3408                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3409                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3410                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3411                 </fields>
3412                 <links>
3413                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3414                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3415                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3416                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3417                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3418                 </links>
3419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3420                         <actions>
3421                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3422                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3423                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3424                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3425                         </actions>
3426                 </permacrud>
3427         </class>
3428
3429         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3430                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3431                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3432                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3433                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3434                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3435                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3436                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3437                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3438                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3439                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3440                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3441                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3442                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3443                 </fields>
3444                 <links>
3445                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3446                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3447                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3448                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3449                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3450                 </links>
3451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3452                         <actions>
3453                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3454                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3455                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3456                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3457                         </actions>
3458                 </permacrud>
3459         </class>
3460         
3461         <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">
3462                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3463                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3464                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3465                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3466                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3467                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3468                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3469                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3470                 </fields>
3471                 <links>
3472                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3473                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3474                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3475                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3476                 </links>
3477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3478                         <actions>
3479                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3480                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3481                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3482                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3483                         </actions>
3484                 </permacrud>
3485         </class>
3486         
3487         <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">
3488                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3489                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3490                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3491                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3492                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3493                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3494                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3495                 </fields>
3496                 <links>
3497                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3498                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3499                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3500                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3501                 </links>
3502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3503                         <actions>
3504                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3505                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3506                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3507                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3508                         </actions>
3509                 </permacrud>
3510         </class>
3511         
3512         <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">
3513                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3514                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3515                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3516                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3517                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3518                 </fields>
3519                 <links>
3520                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3521                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3522                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3523                 </links>
3524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3525                         <actions>
3526                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3527                     <context link="resource" field="owner" />
3528                 </create>
3529                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3530                     <context link="resource" field="owner" />
3531                 </retrieve>
3532                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3533                     <context link="resource" field="owner" />
3534                 </update>
3535                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3536                     <context link="resource" field="owner" />
3537                 </delete>
3538                         </actions>
3539                 </permacrud>
3540         </class>
3541         
3542         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3543                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3544                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3545                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3546                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3547                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3548                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3549                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3550                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3551                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3552                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3553                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3554                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3555                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3556                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3557                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3558                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3559                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3560                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3561                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3562                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3563                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3564                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3565                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3566                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3567                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3568                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3569                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3570                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3571                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3572                 </fields>
3573                 <links>
3574                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3575                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3576                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3577                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3578                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3579                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3580                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3581                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3582                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3583                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3584                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3585                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3586                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3587                 </links>
3588                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3589                         <actions>
3590                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3591                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3592                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3593                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3594                         </actions>
3595                 </permacrud>
3596         </class>
3597         
3598         <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">
3599                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3600                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3601                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3602                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3603                 </fields>
3604                 <links>
3605                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3606                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3607                 </links>
3608                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3609                         <actions>
3610                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3611                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3612                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3613                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3614                         </actions>
3615                 </permacrud>
3616         </class>
3617
3618         <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">
3619                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3620                         <field name="bucket" reporter:datatype="link"/>
3621                         <field name="id" reporter:datatype="id" />
3622                         <field name="target_call_number" reporter:datatype="link" />
3623                         <field name="create_time" reporter:datatype="timestamp" />
3624                         <field name="pos" reporter:datatype="int" />
3625                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3626                 </fields>
3627                 <links>
3628                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3629                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3630             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3631                 </links>
3632         </class>
3633         <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">
3634                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3635                         <field name="id" reporter:datatype="id" />
3636                         <field name="item" reporter:datatype="link"/>
3637                         <field name="note" reporter:datatype="text" />
3638                 </fields>
3639                 <links>
3640                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3641                 </links>
3642         </class>
3643         <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">
3644                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3645                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3646                         <field name="btype" reporter:datatype="text"/>
3647                         <field name="id" reporter:datatype="id" />
3648                         <field name="name" reporter:datatype="text"/>
3649                         <field name="owner" reporter:datatype="link"/>
3650                         <field name="pub" reporter:datatype="bool"/>
3651                         <field name="create_time" reporter:datatype="timestamp" />
3652                 </fields>
3653                 <links>
3654                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3655                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3656                 </links>
3657         </class>
3658         <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">
3659                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3660                         <field name="id" reporter:datatype="id" />
3661                         <field name="bucket" reporter:datatype="link"/>
3662                         <field name="note" reporter:datatype="text" />
3663                 </fields>
3664                 <links>
3665                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3666                 </links>
3667         </class>
3668         <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">
3669                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3670                         <field name="hold" reporter:datatype="link"/>
3671                         <field name="id" reporter:datatype="id" />
3672                         <field name="target_copy" reporter:datatype="link"/>
3673                 </fields>
3674                 <links>
3675                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3676                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3677                 </links>
3678         </class>
3679         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3680                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3681                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3682                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3683                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3684                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3685                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3686                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3687                 </fields>
3688                 <links>
3689                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3690                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3691                 </links>
3692         </class>
3693         <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">
3694                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3695                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3696                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3697                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3698                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3699                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3700                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3701                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3702                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3703                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3704                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3705                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3706                 </fields>
3707                 <links>
3708                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3709                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3710                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3711                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3712                 </links>
3713         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3714             <actions>
3715                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3716                 <retrieve/>
3717                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3718                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3719             </actions>
3720         </permacrud>
3721         </class>
3722
3723     <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">
3724         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3725             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3726             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3727             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3728             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3729         </fields>
3730         <links>
3731             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3732             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3733         </links>
3734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3735             <actions>
3736                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3737                 <retrieve/>
3738                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3739                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3740             </actions>
3741         </permacrud>
3742     </class>
3743
3744         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3745                 <fields>
3746                         <field name="sre_id" oils_persist:virtual="true" />
3747                         <field name="location" oils_persist:virtual="true" />
3748                         <field name="owning_lib" oils_persist:virtual="true" />
3749                         <field name="basic_holdings" oils_persist:virtual="true" />
3750                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3751                         <field name="supplement_holdings" oils_persist:virtual="true" />
3752                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3753                         <field name="index_holdings" oils_persist:virtual="true" />
3754                         <field name="index_holdings_add" oils_persist:virtual="true" />
3755                         <field name="online" oils_persist:virtual="true" />
3756                         <field name="missing" oils_persist:virtual="true" />
3757                         <field name="incomplete" oils_persist:virtual="true" />
3758                 </fields>
3759         </class>
3760
3761         <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">
3762                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3763                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3764                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3765                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3766                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3767                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3768                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3769                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3770                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3771                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3772                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3773                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3774                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3775                 </fields>
3776                 <links>
3777                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3778                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3779                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3780                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3781                 </links>
3782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3783                         <actions>
3784                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3785                                 <retrieve/>
3786                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3787                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3788                         </actions>
3789                 </permacrud>
3790         </class>
3791
3792         <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">
3793                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3794                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3795                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3796                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3797                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3798                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3799                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3800                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3801                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3802                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3803                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3804                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3805                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3806                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3807                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3808                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3809                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3810                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3811                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3812                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3813                 </fields>
3814                 <links>
3815                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3816                 </links>
3817                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3818                         <actions>
3819                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3820                                         <context link="subscription" field="owning_lib" />
3821                                 </create>
3822                                 <retrieve />
3823                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3824                                         <context link="subscription" field="owning_lib" />
3825                                 </update>
3826                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3827                                         <context link="subscription" field="owning_lib" />
3828                                 </delete>
3829                         </actions>
3830                 </permacrud>
3831         </class>
3832
3833         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3834                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3835                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3836                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3837                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3838                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3839                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3840                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3841                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3842                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3843                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3844                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3845                 </fields>
3846                 <links>
3847                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3848                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3849                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3850                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3851                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3852                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3853                 </links>
3854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3855                         <actions>
3856                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3857                                 <retrieve />
3858                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3859                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3860                         </actions>
3861                 </permacrud>
3862         </class>
3863
3864         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
3865                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3866                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3867                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3868                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3869                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3870                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3871                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3872                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3873                 </fields>
3874                 <links>
3875                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3876                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3877                 </links>
3878                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3879                 </permacrud>
3880         </class>
3881
3882         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3883                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3884                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3885                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3886                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3887                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3888                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3889                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3890                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3891                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3892                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3893                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3894                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3895                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3896                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3897                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3898                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3899                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3900                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3901                 </fields>
3902                 <links>
3903                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3904                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3905                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3906                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3907                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3908                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3909                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3910                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3911                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3912                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3913                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3914                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3915                 </links>
3916                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3917                         <actions>
3918                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3919                                 <retrieve />
3920                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3921                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3922                         </actions>
3923                 </permacrud>
3924         </class>
3925
3926         <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">
3927                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3928                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3929                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3930                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3931                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3932                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3933                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3934                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3935                 </fields>
3936                 <links>
3937                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3938                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3939                 </links>
3940                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3941                         <actions>
3942                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3943                                         <context link="distribution" field="holding_lib" />
3944                                 </create>
3945                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3946                                         <context link="distribution" field="holding_lib" />
3947                                 </retrieve>
3948                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3949                                         <context link="distribution" field="holding_lib" />
3950                                 </update>
3951                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3952                                         <context link="distribution" field="holding_lib" />
3953                                 </delete>
3954                         </actions>
3955                 </permacrud>
3956         </class>
3957
3958         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3959                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3960                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3961                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3962                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3963                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3964                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3965                 </fields>
3966                 <links>
3967                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3968                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3969                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3970                 </links>
3971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3972                         <actions>
3973                                 <create permission="ADMIN_SERIAL_STREAM">
3974                                         <context link="distribution" field="holding_lib" />
3975                                 </create>
3976                                 <retrieve />
3977                                 <update permission="ADMIN_SERIAL_STREAM">
3978                                         <context link="distribution" field="holding_lib" />
3979                                 </update>
3980                                 <delete permission="ADMIN_SERIAL_STREAM">
3981                                         <context link="distribution" field="holding_lib" />
3982                                 </delete>
3983                         </actions>
3984                 </permacrud>
3985         </class>
3986
3987         <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">
3988                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3990                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3991                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3992                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3993                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3994                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3995                 </fields>
3996                 <links>
3997                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3998                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3999                 </links>
4000                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4001                         <actions>
4002                                 <create permission="ADMIN_SERIAL_STREAM">
4003                                         <context link="stream" jump="distribution" field="holding_lib" />
4004                                 </create>
4005                                 <retrieve permission="RECEIVE_SERIAL">
4006                                         <context link="stream" jump="distribution" field="holding_lib" />
4007                                 </retrieve>
4008                                 <update permission="ADMIN_SERIAL_STREAM">
4009                                         <context link="stream" jump="distribution" field="holding_lib" />
4010                                 </update>
4011                                 <delete permission="ADMIN_SERIAL_STREAM">
4012                                         <context link="stream" jump="distribution" field="holding_lib" />
4013                                 </delete>
4014                         </actions>
4015                 </permacrud>
4016         </class>
4017
4018         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4019                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4020                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4021                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4022                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4023                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4024                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4025                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4026                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4027                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4028                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4029                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4030                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4031                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4032                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4033                 </fields>
4034                 <links>
4035                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4036                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4037                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4038                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4039                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4040                 </links>
4041                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4042                         <actions>
4043                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4044                                         <context link="subscription" field="owning_lib" />
4045                                 </create>
4046                                 <retrieve/>
4047                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4048                                         <context link="subscription" field="owning_lib" />
4049                                 </update>
4050                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4051                                         <context link="subscription" field="owning_lib" />
4052                                 </delete>
4053                         </actions>
4054                 </permacrud>
4055         </class>
4056
4057         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4058                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4059                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4060                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4061                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4062                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4063                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4064                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4065                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4066                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4067                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4068                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4069                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4070                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4071                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4072                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4073                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4074                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4075                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4076                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4077                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4078                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4079                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4080                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4081                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4082                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4083                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4084                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4085                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4086                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4087                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4088                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4089                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4090                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4091                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4092                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4093                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4094                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4095                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4096                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4097                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4098                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4099                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4100                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4101                 </fields>
4102                 <links>
4103                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4104                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4105                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4106                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4107                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4108                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4109                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4110                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4111                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4112                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4113                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4114                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4115                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4116                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4117                 </links>
4118                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4119                         <actions>
4120                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4121                                 <retrieve/>
4122                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4123                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4124                         </actions>
4125                 </permacrud>
4126         </class>
4127
4128         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4129                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4130                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4131                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4132                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4133                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4134                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4135                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4136                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4137                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4138                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4139                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4140                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4141                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4142                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4143                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4144                 </fields>
4145                 <links>
4146                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4147                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4148                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4149                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4150                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4151                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4152                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4153                 </links>
4154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4155                         <actions>
4156                                 <create permission="ADMIN_SERIAL_ITEM">
4157                                         <context link="stream" jump="distribution" field="holding_lib" />
4158                                 </create>
4159                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4160                                         <context link="stream" jump="distribution" field="holding_lib" />
4161                                 </retrieve>
4162                                 <update permission="ADMIN_SERIAL_ITEM">
4163                                         <context link="stream" jump="distribution" field="holding_lib" />
4164                                 </update>
4165                                 <delete permission="ADMIN_SERIAL_ITEM">
4166                                         <context link="stream" jump="distribution" field="holding_lib" />
4167                                 </delete>
4168                         </actions>
4169                 </permacrud>
4170         </class>
4171
4172         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4173                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4174                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4175                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4176                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4177                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4178                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4179                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4180                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4181                 </fields>
4182                 <links>
4183                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4184                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4185                 </links>
4186                 <!-- Not available via PCRUD at this time -->
4187         </class>
4188
4189         <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">
4190                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4191                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4192                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4193                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4194                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4195                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4196                 </fields>
4197                 <links>
4198                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4199                 </links>
4200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4201                         <actions>
4202                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4203                                         <context link="distribution" field="holding_lib" />
4204                                 </create>
4205                                 <retrieve/>
4206                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4207                                         <context link="distribution" field="holding_lib" />
4208                                 </update>
4209                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4210                                         <context link="distribution" field="holding_lib" />
4211                                 </create>
4212                         </actions>
4213                 </permacrud>
4214         </class>
4215
4216         <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">
4217                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4218                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4219                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4220                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4221                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4222                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4223                 </fields>
4224                 <links>
4225                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4226                 </links>
4227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4228                         <actions>
4229                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4230                                         <context link="distribution" field="holding_lib" />
4231                                 </create>
4232                                 <retrieve/>
4233                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4234                                         <context link="distribution" field="holding_lib" />
4235                                 </update>
4236                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4237                                         <context link="distribution" field="holding_lib" />
4238                                 </create>
4239                         </actions>
4240                 </permacrud>
4241         </class>
4242
4243         <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">
4244                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4245                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4246                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4247                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4248                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4249                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4250                 </fields>
4251                 <links>
4252                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4253                 </links>
4254                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4255                         <actions>
4256                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4257                                         <context link="distribution" field="holding_lib" />
4258                                 </create>
4259                                 <retrieve/>
4260                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4261                                         <context link="distribution" field="holding_lib" />
4262                                 </update>
4263                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4264                                         <context link="distribution" field="holding_lib" />
4265                                 </create>
4266                         </actions>
4267                 </permacrud>
4268         </class>
4269
4270         <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">
4271                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4272                         <field name="id" reporter:datatype="id" />
4273                         <field name="owning_copy" reporter:datatype="link"/>
4274                         <field name="stat_cat" reporter:datatype="link"/>
4275                         <field name="stat_cat_entry" reporter:datatype="link"/>
4276                 </fields>
4277                 <links>
4278                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4279                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4280                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4281                 </links>
4282         </class>
4283         <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">
4284                 <fields oils_persist:primary="code">
4285                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4286                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4287                 </fields>
4288                 <links/>
4289         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4290             <actions>
4291                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4292                 <retrieve/>
4293                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4294                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4295             </actions>
4296         </permacrud>
4297         </class>
4298         <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">
4299                 <fields oils_persist:primary="code">
4300                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4301                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4302                 </fields>
4303                 <links/>
4304         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4305             <actions>
4306                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4307                 <retrieve/>
4308                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4309                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4310             </actions>
4311         </permacrud>
4312         </class>
4313         <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">
4314                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4315                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4316                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4317                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4318                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4319                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4320                 </fields>
4321                 <links>
4322             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4323         </links>
4324         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4325             <actions>
4326                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4327                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4328                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4329                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4330             </actions>
4331         </permacrud>
4332         </class>
4333         <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">
4334                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4335                         <field name="id" reporter:datatype="id" />
4336                         <field name="name" reporter:datatype="text"/>
4337                 </fields>
4338                 <links/>
4339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4340             <actions>
4341                 <create permission="CREATE_LASSO" global_required="true"/>
4342                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4343                 <update permission="UPDATE_LASSO" global_required="true"/>
4344                 <delete permission="DELETE_LASSO" global_required="true"/>
4345             </actions>
4346         </permacrud>
4347         </class>
4348         <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">
4349                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4350                         <field name="id" reporter:datatype="id" />
4351                         <field name="lasso" reporter:datatype="link"/>
4352                         <field name="org_unit" reporter:datatype="org_unit"/>
4353                 </fields>
4354                 <links>
4355                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4356                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4357                 </links>
4358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4359             <actions>
4360                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4361                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4362                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4363                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4364             </actions>
4365         </permacrud>
4366         </class>
4367         <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">
4368                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4369                         <field name="id" reporter:datatype="id" />
4370                         <field name="from_org" reporter:datatype="org_unit"/>
4371                         <field name="to_org" reporter:datatype="org_unit"/>
4372                         <field name="prox" reporter:datatype="int" />
4373                 </fields>
4374                 <links>
4375                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4376                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4377                 </links>
4378         </class>
4379         <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">
4380                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4381                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4382                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4383                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4384                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4385                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4386                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4387                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4388                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4389                 </fields>
4390                 <links/>
4391         </class>
4392         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4393                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4394                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4395                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4396                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4397                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4398                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4399                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4400                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4401                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4402                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4403                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4404                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4405                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4406                 </fields>
4407                 <links>
4408                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4409                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4410                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4411                 </links>
4412         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4413             <actions>
4414                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4415                 <retrieve/>
4416                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4417                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4418             </actions>
4419         </permacrud>
4420         </class>
4421         <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">
4422                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4423                         <field name="address_type"  reporter:datatype="text"/>
4424                         <field name="city"  reporter:datatype="text"/>
4425                         <field name="country"  reporter:datatype="text"/>
4426                         <field name="county"  reporter:datatype="text"/>
4427                         <field name="id" reporter:datatype="id" />
4428                         <field name="org_unit" reporter:datatype="org_unit"/>
4429                         <field name="post_code"  reporter:datatype="text"/>
4430                         <field name="state"  reporter:datatype="text"/>
4431                         <field name="street1"  reporter:datatype="text"/>
4432                         <field name="street2"  reporter:datatype="text"/>
4433                         <field name="valid" reporter:datatype="bool"/>
4434                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4435                 </fields>
4436                 <links>
4437                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4438                 </links>
4439         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4440             <actions>
4441                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4442                 <retrieve/>
4443                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4444                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4445             </actions>
4446         </permacrud>
4447         </class>
4448         <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">
4449                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4450                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4451                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4452                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4453                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4454                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4455                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4456                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4457                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4458                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4459                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4460                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4461                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4462                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4463                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4464                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4465                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4466                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4467                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4468                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4469                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4470                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4471                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4472                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4473                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4474                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4475                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4476                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4477                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4478                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4479                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4480                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4481                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4482                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4483                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4484                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4485                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4486                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4487                 </fields>
4488                 <links>
4489                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4490                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4491                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4492                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4493                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4494                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4495                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4496                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4497                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4498                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4499                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4500                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4501                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4502                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4503                 </links>
4504         </class>
4505         <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">
4506                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4507                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4508                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4509                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4510                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4511                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4512                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4513                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4514                 </fields>
4515                 <links>
4516                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4517                 </links>
4518                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4519                         <actions>
4520                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4521                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4522                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4523                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4524                         </actions>
4525                 </permacrud>
4526         </class>
4527         <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">
4528                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4529                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4530                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4531                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4532                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4533                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4534                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4535                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4536                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4537                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4538                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4539                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4540                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4541                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4542                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4543                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4544                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4545                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4546                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4547                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4548                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4549                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4550                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4551                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4552                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4553                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4554                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4555                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4556                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4557                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4558                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4559                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4560                 </fields>
4561                 <links>
4562                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4563                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4564                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4565                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4566                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4567                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4568                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4569                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4570                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4571                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4572                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4573                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4574                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4575                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4576                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4577                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4578                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4579                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4580                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4581                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4582                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4583                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4584                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4585                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4586                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4587                 </links>
4588         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4589             <actions>
4590                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4591                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4592                     <context field="id"/>
4593                     <context field="parent_ou"/>
4594                                 </retrieve>
4595                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4596                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4597             </actions>
4598         </permacrud>
4599         </class>
4600         <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">
4601                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4602                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4603                         <field name="btype" reporter:datatype="text"/>
4604                         <field name="id" reporter:datatype="id" />
4605                         <field name="name"  reporter:datatype="text"/>
4606                         <field name="owner" reporter:datatype="link"/>
4607                         <field name="pub" reporter:datatype="bool"/>
4608                         <field name="create_time" reporter:datatype="timestamp" />
4609                 </fields>
4610                 <links>
4611                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4612                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4613                 </links>
4614         </class>
4615         <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">
4616                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4617                         <field name="id" reporter:datatype="id" />
4618                         <field name="bucket" reporter:datatype="link"/>
4619                         <field name="note" reporter:datatype="text" />
4620                 </fields>
4621                 <links>
4622                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4623                 </links>
4624         </class>
4625         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4626                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4627                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4628                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4629                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4630                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4631                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4632                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4633                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4634                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4635                 </fields>
4636                 <links>
4637                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4638                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4639                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4640                 </links>
4641         </class>
4642         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4643                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4644                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4645                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4646                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4647                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4648                 </fields>
4649                 <links>
4650                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4651                 </links>
4652         </class>
4653     <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">
4654         <fields oils_persist:primary="field">
4655             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4656             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4657             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4658         </fields>
4659         <links/>
4660         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4661             <actions>
4662                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4663                 <retrieve />
4664                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4665                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4666             </actions>
4667         </permacrud>
4668     </class>
4669         <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">
4670                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4671                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4672                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4673                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4674                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4675                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4676                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4677                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4678                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4679                 </fields>
4680                 <links>
4681                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4682                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4683                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4684                 </links>
4685         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4686             <actions>
4687                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4688                 <retrieve />
4689                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4690                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4691             </actions>
4692         </permacrud>
4693         </class>
4694         <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">
4695                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4696                         <field name="field" reporter:datatype="link"/>
4697                         <field name="id" reporter:datatype="id" />
4698                         <field name="source" reporter:datatype="link"/>
4699                         <field name="value"  reporter:datatype="text"/>
4700                 </fields>
4701                 <links>
4702                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4703                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4704                 </links>
4705         </class>
4706         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4707                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4708                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4709                         <field name="btype" reporter:datatype="text"/>
4710                         <field name="id" reporter:datatype="id" />
4711                         <field name="name"  reporter:datatype="text"/>
4712                         <field name="owner" reporter:datatype="link"/>
4713                         <field name="pub" reporter:datatype="bool"/>
4714                         <field name="create_time" reporter:datatype="timestamp" />
4715                 </fields>
4716                 <links>
4717                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4718                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4719                 </links>
4720         </class>
4721         <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">
4722                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4723                         <field name="id" reporter:datatype="id" />
4724                         <field name="bucket" reporter:datatype="link"/>
4725                         <field name="note" reporter:datatype="text" />
4726                 </fields>
4727                 <links>
4728                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4729                 </links>
4730         </class>
4731         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4732                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4733                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4734                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4735                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4736                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4737                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4738                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4739                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4740                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4741                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4742                 </fields>
4743                 <links>
4744                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4745                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4746                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4747                 </links>
4748         </class>
4749         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4750                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4751                         <field name="id" reporter:datatype="id" />
4752                         <field name="ind1" />
4753                         <field name="ind2" />
4754                         <field name="record" />
4755                         <field name="subfield" />
4756                         <field name="tag" />
4757                         <field name="value" />
4758                 </fields>
4759                 <links>
4760                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4761                 </links>
4762         </class>
4763         <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">
4764                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4765                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4766                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4767                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4768                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4769                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4770                 </fields>
4771                 <links>
4772                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4773                 </links>
4774         </class>
4775         <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">
4776                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4777                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4778                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4779                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4780                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4781                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4782                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4783                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4784                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4785                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4786                 </fields>
4787                 <links>
4788                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4789                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4790                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4791                 </links>
4792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4793             <actions>
4794                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4795                 <retrieve/>
4796                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4797                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4798             </actions>
4799         </permacrud>
4800         </class>
4801         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4802                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4803                         <field name="create_date" reporter:datatype="timestamp"/>
4804                         <field name="creator" reporter:datatype="link"/>
4805                         <field name="edit_date" reporter:datatype="timestamp"/>
4806                         <field name="editor" reporter:datatype="link"/>
4807                         <field name="id" reporter:datatype="id" />
4808                         <field name="pub" reporter:datatype="bool"/>
4809                         <field name="record" reporter:datatype="link"/>
4810                         <field name="value"  reporter:datatype="text"/>
4811                 </fields>
4812                 <links>
4813                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4814                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4815                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4816                 </links>
4817         </class>
4818         <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">
4819                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4820                         <field name="balance_owed" reporter:datatype="money" />
4821                         <field name="total_owed" reporter:datatype="money" />
4822                         <field name="total_paid" reporter:datatype="money" />
4823                         <field name="usr" reporter:datatype="link"/>
4824                 </fields>
4825                 <links>
4826                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4827                 </links>
4828         </class>
4829         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4830                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4831                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4832                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4833                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4834                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4835                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4836                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4837                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4838                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4839                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4840                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4841                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4842                 </fields>
4843                 <links>
4844                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4845                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4846                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4847                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4848                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4849                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4850                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4851                 </links>
4852         </class>
4853         <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">
4854                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4855                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4856                         <field name="quality" reporter:datatype="int" />
4857                         <field name="source" reporter:datatype="text"/>
4858                         <field name="transcendant" reporter:datatype="bool"/>
4859                 </fields>
4860                 <links/>
4861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4862             <actions>
4863                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4864                 <retrieve/>
4865                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4866                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4867             </actions>
4868         </permacrud>
4869         </class>
4870         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4871                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4872                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4873                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4874                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4875                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4876                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4877                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4878                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4879                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4880                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4881                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4882                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4883                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4884                 </fields>
4885                 <links>
4886                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4887                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4888                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4889                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4890                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4891                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4892                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4893                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4894                 </links>
4895         </class>
4896         <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">
4897                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4898                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4899                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4900                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4901                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4902                 </fields>
4903                 <links>
4904                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4905                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4906                 </links>
4907         </class>
4908         <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">
4909                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4910                         <field name="bucket" reporter:datatype="link"/>
4911                         <field name="id" reporter:datatype="id" />
4912                         <field name="target_user" reporter:datatype="link"/>
4913                         <field name="create_time" reporter:datatype="timestamp" />
4914                         <field name="pos" reporter:datatype="int" />
4915                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4916                 </fields>
4917                 <links>
4918                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4919                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4920             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4921                 </links>
4922         </class>
4923         <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">
4924                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4925                         <field name="id" reporter:datatype="id" />
4926                         <field name="item" reporter:datatype="link"/>
4927                         <field name="note" reporter:datatype="text" />
4928                 </fields>
4929                 <links>
4930                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4931                 </links>
4932         </class>
4933         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4934                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4935                         <field name="balance_owed" reporter:datatype="money" />
4936                         <field name="total_owed" reporter:datatype="money" />
4937                         <field name="total_paid" reporter:datatype="money" />
4938                         <field name="usr" reporter:datatype="link"/>
4939                 </fields>
4940                 <links>
4941                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4942                 </links>
4943         </class>
4944         <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">
4945                 <fields oils_persist:primary="code" oils_persist:sequence="">
4946                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4947                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4948                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4949                 </fields>
4950                 <links/>
4951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4952             <actions>
4953                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4954                 <retrieve/>
4955                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4956                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4957             </actions>
4958         </permacrud>
4959         </class>
4960         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4961                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4962                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4963                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4964                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4965                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4966                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4967                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4968                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4969                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4970                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4971                 </fields>
4972                 <links>
4973                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4974                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4975                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4976                 </links>
4977         </class>
4978         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4979                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4980                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4981                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4982                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4983                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4984                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4985                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4986                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4987                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4988                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4989                 </fields>
4990                 <links>
4991                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4992                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4993                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4994                 </links>
4995         </class>
4996         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4997                 <fields oils_persist:primary="id" oils_persist:sequence="">
4998                         <field name="checkin_lib" reporter:datatype="link"/>
4999                         <field name="checkin_staff" reporter:datatype="link"/>
5000                         <field name="checkin_time" reporter:datatype="timestamp"/>
5001                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5002                         <field name="circ_staff" reporter:datatype="link"/>
5003                         <field name="desk_renewal" reporter:datatype="bool"/>
5004                         <field name="due_date" reporter:datatype="timestamp"/>
5005                         <field name="duration" reporter:datatype="interval"/>
5006                         <field name="duration_rule" reporter:datatype="link"/>
5007                         <field name="fine_interval" reporter:datatype="interval"/>
5008                         <field name="id" reporter:datatype="id" />
5009                         <field name="max_fine" reporter:datatype="money" />
5010                         <field name="max_fine_rule" reporter:datatype="link"/>
5011                         <field name="opac_renewal" reporter:datatype="bool"/>
5012                         <field name="phone_renewal" reporter:datatype="bool"/>
5013                         <field name="recurring_fine" reporter:datatype="money" />
5014                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5015                         <field name="renewal_remaining" reporter:datatype="int" />
5016             <field name="grace_period" reporter:datatype="interval" />
5017                         <field name="stop_fines" reporter:datatype="text"/>
5018                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5019                         <field name="target_copy" reporter:datatype="link"/>
5020                         <field name="usr" reporter:datatype="link"/>
5021                         <field name="xact_finish" reporter:datatype="timestamp" />
5022                         <field name="xact_start" reporter:datatype="timestamp" />
5023                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5024                 </fields>
5025                 <links>
5026                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5027                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5028                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5029                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5030                 </links>
5031         </class>
5032         <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">
5033                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5034                         <field name="field" reporter:datatype="link"/>
5035                         <field name="id" reporter:datatype="id" />
5036                         <field name="source" reporter:datatype="link"/>
5037                         <field name="value" reporter:datatype="text"/>
5038                 </fields>
5039                 <links>
5040                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5041                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5042                 </links>
5043         </class>
5044         <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">
5045                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5046                         <field name="high" reporter:datatype="money" />
5047                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5048                         <field name="low" reporter:datatype="money" />
5049                         <field name="name" reporter:datatype="text"/>
5050                         <field name="normal" reporter:datatype="money" />
5051                         <field name="recurrence_interval" reporter:datatype="interval"/>
5052             <field name="grace_period" reporter:datatype="interval" />
5053                 </fields>
5054                 <links/>
5055         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5056             <actions>
5057                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5058                 <retrieve/>
5059                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5060                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5061             </actions>
5062         </permacrud>
5063         </class>
5064         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5065                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5066                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5067                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5068                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5069                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5070                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5071                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5072                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5073                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5074                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5075                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5076                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5077                 </fields>
5078                 <links>
5079                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5080                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5081                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5082                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5083                 </links>
5084         </class>
5085         <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">
5086                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5087                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5088                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5089                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5090                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5091                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5092                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5093                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5094                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5095                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5096                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5097                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5098                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5099                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5100                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5101                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5102                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5103                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5104                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5105                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5106                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5107                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5108                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5109                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5110                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5111                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5112                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5113                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5114                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5115                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5116                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5117                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5118                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5119                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5120                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5121                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5122                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5123                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5124                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5125                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5126                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5127                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5128                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5129                 </fields>
5130                 <links>
5131                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5132                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5133                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5134                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5135                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5136                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5137                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5138                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5139                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5140                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5141                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5142                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5143                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5144                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5145                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5146                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5147                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5148                 </links>
5149         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5150             <actions>
5151                 <create permission="CREATE_COPY">
5152                     <context link="call_number" field="owning_lib"/>
5153                 </create>
5154                 <retrieve/>
5155                 <update permission="UPDATE_COPY">
5156                     <context link="call_number" field="owning_lib"/>
5157                 </update>
5158                 <delete permission="DELETE_COPY">
5159                     <context link="call_number" field="owning_lib"/>
5160                 </delete>
5161             </actions>
5162         </permacrud>
5163         </class>
5164
5165         <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">
5166                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5167                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5168                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5169                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5170                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5171                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5172                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5173                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5174                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5175                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
5176                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5177                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5178                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5179                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5180                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5181                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5182                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5183                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5184                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5185                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5186                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5187                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5188                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5189                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5190                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5191                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5192                 </fields>
5193                 <links>
5194                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5195                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5196                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5197                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5198                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5199                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5200                 </links>
5201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5202                         <actions>
5203                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5204                                 <retrieve />
5205                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5206                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5207                         </actions>
5208                 </permacrud>
5209         </class>
5210
5211         <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">
5212                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5213                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5214                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5215                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5216                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5217                 </fields>
5218                 <links/>
5219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5220             <actions>
5221                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5222                 <retrieve/>
5223                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5224                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5225             </actions>
5226         </permacrud>
5227         </class>
5228         <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">
5229                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5230                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5231                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5232                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5233                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5234                 </fields>
5235                 <links/>
5236         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5237             <actions>
5238                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5239                 <retrieve/>
5240                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5241                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5242             </actions>
5243         </permacrud>
5244         </class>
5245         <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">
5246                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5247                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5248                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5249                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5250                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5251                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5252                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5253                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5254                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5255                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5256                 </fields>
5257                 <links>
5258                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5259                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5260                 </links>
5261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5262             <actions>
5263                 <create permission="CREATE_PERM" global_required="true"/>
5264                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5265                 <update permission="UPDATE_PERM" global_required="true"/>
5266                 <delete permission="DELETE_PERM" global_required="true"/>
5267             </actions>
5268         </permacrud>
5269         </class>
5270         <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">
5271                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5272                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5273                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5274                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5275                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5276                 </fields>
5277                 <links>
5278                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5279                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5280                 </links>
5281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5282             <actions>
5283                 <create permission="ADMIN_SURVEY">
5284                     <context link="question" jump="survey" field="owner"/>
5285                 </create>
5286                 <retrieve/>
5287                 <update permission="ADMIN_SURVEY">
5288                     <context link="question" jump="survey" field="owner"/>
5289                 </update>
5290                 <delete permission="ADMIN_SURVEY">
5291                     <context link="question" jump="survey" field="owner"/>
5292                 </delete>
5293             </actions>
5294         </permacrud>
5295         </class>
5296         <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">
5297                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5298                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5299                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5300                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5301                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5302                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5303                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5304                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5305                 </fields>
5306                 <links>
5307                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5308                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5309                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5310                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5311                 </links>
5312         </class>
5313         <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">
5314                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5315                         <field name="balance_owed" reporter:datatype="money" />
5316                         <field name="total_owed" reporter:datatype="money" />
5317                         <field name="total_paid" reporter:datatype="money" />
5318                         <field name="usr" reporter:datatype="link"/>
5319                 </fields>
5320                 <links>
5321                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5322                 </links>
5323         </class>
5324         <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">
5325                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5326                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5327                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5328                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5329                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5330                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5331                 </fields>
5332                 <links>
5333                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5334                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5335                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5336                 </links>
5337         </class>
5338         <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">
5339                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5340                         <field name="field" reporter:datatype="link"/>
5341                         <field name="id" reporter:datatype="id" />
5342                         <field name="source" reporter:datatype="link"/>
5343                         <field name="value" reporter:datatype="text"/>
5344                 </fields>
5345                 <links>
5346                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5347                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5348                 </links>
5349         </class>
5350         <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">
5351                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5352                         <field name="field" reporter:datatype="link"/>
5353                         <field name="id" reporter:datatype="id" />
5354                         <field name="source" reporter:datatype="link"/>
5355                         <field name="value" reporter:datatype="text"/>
5356                 </fields>
5357                 <links>
5358                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5359                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5360                 </links>
5361         </class>
5362         <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">
5363                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5364                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5365                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5366                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5367                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5368                 </fields>
5369                 <links>
5370                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5371                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5372                 </links>
5373         </class>
5374         <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">
5375                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5376                         <field name="depth" reporter:datatype="int" />
5377                         <field name="grantable" reporter:datatype="bool"/>
5378                         <field name="grp" reporter:datatype="link"/>
5379                         <field name="id" reporter:datatype="id" />
5380                         <field name="perm" reporter:datatype="link"/>
5381                 </fields>
5382                 <links>
5383                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5384                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5385                 </links>
5386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5387             <actions>
5388                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5389                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5390                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5391                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5392             </actions>
5393         </permacrud>
5394         </class>
5395         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5396                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5397                         <field name="items" oils_persist:virtual="true" />
5398                         <field name="btype" reporter:datatype="text"/>
5399                         <field name="id" reporter:datatype="id" />
5400                         <field name="name" reporter:datatype="text"/>
5401                         <field name="owner" reporter:datatype="link"/>
5402                         <field name="pub" reporter:datatype="bool"/>
5403                         <field name="create_time" reporter:datatype="timestamp" />
5404                 </fields>
5405                 <links>
5406                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5407                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5408                 </links>
5409         </class>
5410         <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">
5411                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5412                         <field name="id" reporter:datatype="id" />
5413                         <field name="bucket" reporter:datatype="link"/>
5414                         <field name="note" reporter:datatype="text" />
5415                 </fields>
5416                 <links>
5417                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5418                 </links>
5419         </class>
5420         <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">
5421                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5422                         <field name="id" reporter:datatype="int" />
5423                         <field name="usr" reporter:datatype="link"/>
5424                         <field name="work_ou" reporter:datatype="link"/>
5425                 </fields>
5426                 <links>
5427                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5428                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5429                 </links>
5430         </class>
5431         <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">
5432                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5433                         <field name="depth" reporter:datatype="int"/>
5434                         <field name="grantable" reporter:datatype="bool"/>
5435                         <field name="id" reporter:datatype="id" />
5436                         <field name="perm" reporter:datatype="link"/>
5437                         <field name="usr" reporter:datatype="link"/>
5438                 </fields>
5439                 <links>
5440                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5441                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5442                 </links>
5443         </class>
5444         <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">
5445                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5446                         <field name="object_id" reporter:datatype="text"/>
5447                         <field name="grantable" reporter:datatype="bool"/>
5448                         <field name="id" reporter:datatype="id" />
5449                         <field name="perm" reporter:datatype="link"/>
5450                         <field name="usr" reporter:datatype="link"/>
5451                         <field name="object_type" reporter:datatype="text"/>
5452                 </fields>
5453                 <links>
5454                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5455                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5456                 </links>
5457         </class>
5458         <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">
5459                 <fields oils_persist:primary="id" oils_persist:sequence="">
5460                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5461                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5462                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5463                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5464                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5465                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5466                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5467                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5468                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5469                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5470                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5471                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5472                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5473                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5474                 </fields>
5475                 <links>
5476                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5477                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5478                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5479                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5480                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5481                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5482                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5483                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5484                 </links>
5485         </class>
5486         <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">
5487                 <fields oils_persist:primary="id" oils_persist:sequence="">
5488                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5489                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5490                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5491                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5492                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5493                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5494                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5495                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5496                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5497                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5498                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5499                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5500                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5501                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5502                 </fields>
5503                 <links>
5504                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5505                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5506                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5507                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5508                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5509                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5510                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5511                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5512                 </links>
5513         </class>
5514         <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">
5515                 <fields oils_persist:primary="id" oils_persist:sequence="">
5516                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5517                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5518                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5519                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5520                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5521                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5522                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5523                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5524                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5525                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5526                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5527                 </fields>
5528                 <links>
5529                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5530                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5531                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5532                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5533                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5534                 </links>
5535         </class>
5536         <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">
5537                 <fields oils_persist:primary="id" oils_persist:sequence="">
5538                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5539                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5540                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5541                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5542                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5543                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5544                         <field reporter:label="Accepting User" name="accepting_usr" />
5545                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5546                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5547                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5548                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5549                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5550                 </fields>
5551                 <links>
5552                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5553                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5554                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5555                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5556                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5557                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5558                 </links>
5559         </class>
5560         <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">
5561                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5562                         <field name="bucket" reporter:datatype="link"/>
5563                         <field name="id" reporter:datatype="id" />
5564                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5565                         <field name="create_time" reporter:datatype="timestamp" />
5566                         <field name="pos" reporter:datatype="int" />
5567                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5568                 </fields>
5569                 <links>
5570                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5571                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5572             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5573                 </links>
5574         </class>
5575         <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">
5576                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5577                         <field name="id" reporter:datatype="id" />
5578                         <field name="item" reporter:datatype="link"/>
5579                         <field name="note" reporter:datatype="text" />
5580                 </fields>
5581                 <links>
5582                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5583                 </links>
5584         </class>
5585         <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">
5586                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5587                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5588                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5589                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5590                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5591                 </fields>
5592                 <links>
5593                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5594                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5595                 </links>
5596         </class>
5597     <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">
5598         <fields oils_persist:primary="field">
5599             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5600             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5601             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5602         </fields>
5603         <links/>
5604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5605             <actions>
5606                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5607                 <retrieve />
5608                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5609                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5610             </actions>
5611         </permacrud>
5612     </class>
5613         <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">
5614                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5615                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5616                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5617                 </fields>
5618                 <links/>
5619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5620             <actions>
5621                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5622                 <retrieve/>
5623                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5624                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5625             </actions>
5626         </permacrud>
5627         </class>
5628
5629
5630         <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">
5631                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5632                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5633                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5634                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5635                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5636                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5637                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5638                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5639                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5640                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5641                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5642                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5643                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5644                 </fields>
5645                 <links>
5646                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5647                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5648                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5649                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5650                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5651                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5652                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5653                 </links>
5654         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5655             <actions>
5656                 <create permission="TRANSIT_COPY">
5657                     <context link="target_copy" field="owner"/>
5658                 </create>
5659                 <retrieve/>
5660                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5661                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5662             </actions>
5663         </permacrud>
5664         </class>
5665         <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">
5666                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5667                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5668                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5669                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5670                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5671                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5672                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5673                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5674                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5675                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5676                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5677                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5678                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5679                 </fields>
5680                 <links>
5681                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5682                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5683                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5684                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5685                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5686                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5687                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5688                 </links>
5689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5690             <actions>
5691                 <create permission="TRANSIT_COPY" context_field="owner">
5692                     <context link="target_copy" field="circ_lib"/>
5693                 </create>
5694                 <retrieve/>
5695                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5696                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5697             </actions>
5698         </permacrud>
5699         </class>
5700         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5701                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5702                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5703                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5704                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5705                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5706                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5707                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5708                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5709                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5710                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5711                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5712                 </fields>
5713                 <links>
5714                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5715                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5716                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5717                 </links>
5718         </class>
5719         <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">
5720                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5721                         <field name="grp" />
5722                         <field name="id" reporter:datatype="id" />
5723                         <field name="usr" />
5724                 </fields>
5725                 <links>
5726                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5727                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5728                 </links>
5729         </class>
5730         <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">
5731                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5732                         <field name="id" reporter:datatype="id" />
5733                         <field name="fq_field" reporter:datatype="text"/>
5734                         <field name="identity_value" reporter:datatype="text"/>
5735                         <field name="translation" reporter:datatype="text"/>
5736                         <field name="string" reporter:datatype="text"/>
5737                 </fields>
5738                 <links>
5739                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5740                 </links>
5741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5742             <actions>
5743                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5744                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5745                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5746                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5747             </actions>
5748         </permacrud>
5749         </class>
5750         <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">
5751                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5752                         <field name="id" reporter:datatype="id" />
5753                         <field name="fm_class" reporter:datatype="text"/>
5754                         <field name="field" reporter:datatype="text"/>
5755                         <field name="owner" reporter:datatype="org_unit"/>
5756                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5757                 </fields>
5758                 <links>
5759                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5760                 </links>
5761         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5762             <actions>
5763                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5764                 <retrieve/>
5765                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5766                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5767             </actions>
5768         </permacrud>
5769         </class>
5770         <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">
5771                 <fields oils_persist:primary="code">
5772                         <field name="code" reporter:datatype="id" />
5773                         <field name="marc_code" reporter:datatype="text"/>
5774                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5775                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5776                 </fields>
5777                 <links/>
5778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5779             <actions>
5780                 <create permission="CREATE_LOCALE" global_required="true"/>
5781                 <retrieve/>
5782                 <update permission="UPDATE_LOCALE" global_required="true"/>
5783                 <delete permission="DELETE_LOCALE" global_required="true"/>
5784             </actions>
5785         </permacrud>
5786         </class>
5787         <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">
5788                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5789                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5790                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5791                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5792             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5793                 </fields>
5794                 <links>
5795                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5796                 </links>
5797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5798             <actions>
5799                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5800                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5801                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5802                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5803             </actions>
5804         </permacrud>
5805         </class>
5806
5807         <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">
5808                 <fields oils_persist:primary="id">
5809                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5810                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5811                 </fields>
5812                 <links/>
5813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5814             <actions>
5815                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5816                 <retrieve/>
5817                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5818                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5819             </actions>
5820         </permacrud>
5821         </class>
5822
5823         <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">
5824                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5825                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5826                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5827                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5828                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5829                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5830                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5831                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5832                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5833                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5834                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5835                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5836                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5837                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5838                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5839                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5840                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5841                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5842                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5843                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5844                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5845                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5846                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5847                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5848                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5849                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5850                 </fields>
5851                 <links>
5852                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5853                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5854                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5855                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5856                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5857                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5858                 </links>
5859         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5860             <actions>
5861                 <create permission="user_request.create">
5862                     <context link="usr" field="home_ou"/>
5863                                 </create>
5864                 <retrieve permission="user_request.view">
5865                     <context link="usr" field="home_ou"/>
5866                                 </retrieve>
5867                 <update permission="user_request.update">
5868                     <context link="usr" field="home_ou"/>
5869                                 </update>
5870                 <delete permission="user_request.delete">
5871                     <context link="usr" field="home_ou"/>
5872                                 </delete>
5873             </actions>
5874         </permacrud>
5875         </class>
5876
5877         <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">
5878                 <fields oils_persist:primary="code">
5879                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5880                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5881                 </fields>
5882                 <links/>
5883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5884             <actions>
5885                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5886                 <retrieve/>
5887                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5888                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5889             </actions>
5890         </permacrud>
5891         </class>
5892
5893         <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">
5894                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5895                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5896                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5897                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5898                         <field reporter:label="Ratio" name="ratio" />
5899                 </fields>
5900                 <links>
5901                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5902                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5903                 </links>
5904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5905                         <actions>
5906                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5907                                 <retrieve/>
5908                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5909                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5910                         </actions>
5911                 </permacrud>
5912         </class>
5913
5914         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5915                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5916                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5917                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5918                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5919                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5920                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5921                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5922                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5923                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5924                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5925                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5926                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5927                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5928                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5929                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5930                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5931                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5932                 </fields>
5933                 <links>
5934                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5935                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5936             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5937             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5938             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5939                 </links>
5940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5941             <actions>
5942                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5943                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5944                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5945                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5946             </actions>
5947         </permacrud>
5948         </class>
5949
5950         <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">
5951                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5952                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5953                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5954                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5955                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5956                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5957                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5958                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5959                 </fields>
5960                 <links>
5961                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5962                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5963                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5964                 </links>
5965         </class>
5966
5967         <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">
5968                 <fields oils_persist:primary="code">
5969                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5970                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5971                 </fields>
5972                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5973             <actions>
5974                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5975                 <retrieve/>
5976                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5977                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5978             </actions>
5979                 </permacrud>
5980         </class>
5981
5982         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5983                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5984                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5985                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5986                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5987                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5988                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5989                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5990                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5991                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5992                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5993                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5994                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5995                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5996                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5997                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5998                 </fields>
5999                 <links>
6000                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6001                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6002                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6003                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6004                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6005                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6006                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6007                 </links>
6008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6009             <actions>
6010                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6011                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6012                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6013                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6014             </actions>
6015         </permacrud>
6016         </class>
6017
6018         <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">
6019                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6020                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6021                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6022                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6023                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6024                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6025                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6026                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6027                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6028                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6029                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6030                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6031                 </fields>
6032                 <links>
6033                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6034                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6035                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6036                 </links>
6037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6038             <actions>
6039                 <create   permission="ADMIN_INVOICE">
6040                                         <context link="invoice" field="receiver"/>
6041                                 </create>
6042                 <retrieve permission="ADMIN_INVOICE">
6043                                         <context link="invoice" field="receiver"/>
6044                                 </retrieve>
6045                 <update   permission="ADMIN_INVOICE">
6046                                         <context link="invoice" field="receiver"/>
6047                                 </update>
6048                                 <delete   permission="ADMIN_INVOICE">
6049                                         <context link="invoice" field="receiver"/>
6050                                 </delete>
6051             </actions>
6052         </permacrud>
6053         </class>
6054
6055         <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">
6056                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6057                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6058                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6059                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6060                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6061                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6062                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6063                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6064                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6065                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6066                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6067                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6068                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6069                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6070                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6071                 </fields>
6072                 <links>
6073                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6074                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6075                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6076                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6077                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6078                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6079                 </links>
6080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6081             <actions>
6082                 <create   permission="ADMIN_INVOICE">
6083                                         <context link="invoice" field="receiver"/>
6084                                 </create>
6085                 <retrieve permission="ADMIN_INVOICE">
6086                                         <context link="invoice" field="receiver"/>
6087                                 </retrieve>
6088                 <update   permission="ADMIN_INVOICE">
6089                                         <context link="invoice" field="receiver"/>
6090                                 </update>
6091                                 <delete   permission="ADMIN_INVOICE">
6092                                         <context link="invoice" field="receiver"/>
6093                                 </delete>
6094             </actions>
6095         </permacrud>
6096         </class>
6097
6098         <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">
6099                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6100                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6101                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6102                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6103                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6104                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6105                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6106                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6107                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6108                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6109                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6110                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6111                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6112                 </fields>
6113                 <links>
6114                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6115                 </links>
6116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6117             <actions>
6118                 <create permission="ADMIN_PROVIDER">
6119                     <context link="provider" field="owner"/>
6120                 </create>
6121                 <retrieve permission="ADMIN_PROVIDER">
6122                     <context link="provider" field="owner"/>
6123                 </retrieve>
6124                 <update permission="ADMIN_PROVIDER">
6125                     <context link="provider" field="owner"/>
6126                 </update>
6127                 <delete permission="ADMIN_PROVIDER">
6128                     <context link="provider" field="owner"/>
6129                 </delete>
6130             </actions>
6131         </permacrud>
6132         </class>
6133
6134         <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">
6135                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6136                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6137                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6138                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6139                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6140                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6141                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6142         </fields>
6143                 <links>
6144                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6145                 </links>
6146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6147             <actions>
6148                 <create permission="ADMIN_PROVIDER">
6149                     <context link="provider" field="owner"/>
6150                 </create>
6151                 <retrieve permission="ADMIN_PROVIDER">
6152                     <context link="provider" field="owner"/>
6153                 </retrieve>
6154                 <update permission="ADMIN_PROVIDER">
6155                     <context link="provider" field="owner"/>
6156                 </update>
6157                 <delete permission="ADMIN_PROVIDER">
6158                     <context link="provider" field="owner"/>
6159                 </delete>
6160             </actions>
6161         </permacrud>
6162     </class>
6163         <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">
6164                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6165                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6166                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6167                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6168                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6169                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6170                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6171                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6172                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6173                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6174                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6175                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6176                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6177                 </fields>
6178                 <links>
6179                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6180                 </links>
6181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6182             <actions>
6183                 <create permission="ADMIN_PROVIDER">
6184                     <context link="contact" jump='provider' field="owner"/>
6185                 </create>
6186                 <retrieve permission="ADMIN_PROVIDER">
6187                     <context link="contact" jump='provider' field="owner"/>
6188                 </retrieve>
6189                 <update permission="ADMIN_PROVIDER">
6190                     <context link="contact" jump='provider' field="owner"/>
6191                 </update>
6192                 <delete permission="ADMIN_PROVIDER">
6193                     <context link="contact" jump='provider' field="owner"/>
6194                 </delete>
6195             </actions>
6196         </permacrud>
6197         </class>
6198
6199         <class id="acqftr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6200                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6201                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6202                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6203                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6204                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6205                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6206                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6207                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6208                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6209                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6210                 </fields>
6211                 <links>
6212                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6213                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6214                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6215                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6216                 </links>
6217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6218                 </permacrud>
6219         </class>
6220
6221         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6222                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6223                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6224                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6225                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6226                 </fields>
6227                 <links>
6228             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6229                 </links>
6230                 <!--
6231                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6232                         But here's what it should look like if we ever do use pcrud.
6233                 -->
6234                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6235                         <actions>
6236                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6237                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6238                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6239                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6240                         </actions>
6241                 </permacrud>
6242         </class>
6243
6244         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6245                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6246                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6247                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6248                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6249                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6250                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6251                 </fields>
6252                 <links>
6253                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6254                 </links>
6255                 <!--
6256                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6257                         But here's what it should look like if we ever do use pcrud.
6258                 -->
6259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6260                         <actions>
6261                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6262                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6263                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6264                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6265                         </actions>
6266                 </permacrud>
6267         </class>
6268
6269         <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">
6270                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6271                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6272                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6273                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6274                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6275                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6276                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6277                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6278                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6279                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6280                 </fields>
6281                 <links>
6282                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6283                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6284             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6285             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6286                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6287                 </links>
6288         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6289             <actions>
6290                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6291                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6292                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6293                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6294             </actions>
6295         </permacrud>
6296         </class>
6297
6298         <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">
6299                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6300                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6301                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6302                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6303                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6304                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6305                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6306                 </fields>
6307                 <links>
6308                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6309                 </links>
6310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6311                         <actions>
6312                                 <create permission="ADMIN_FUNDING_SOURCE">
6313                     <context link="funding_source" field="owner"/>
6314                 </create>
6315                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6316                     <context link="funding_source" field="owner"/>
6317                 </retrieve>
6318                                 <update permission="ADMIN_FUNDING_SOURCE">
6319                     <context link="funding_source" field="owner"/>
6320                 </update>
6321                                 <delete permission="ADMIN_FUNDING_SOURCE">
6322                     <context link="funding_source" field="owner"/>
6323                 </delete>
6324                         </actions>
6325                 </permacrud>
6326         </class>
6327
6328         <class id="acqofscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
6329                 <fields oils_persist:primary="id">
6330                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6331                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6332                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6333                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6334                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6335                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6336                 </fields>
6337                 <links>
6338                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6339                 </links>
6340                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6341                 </permacrud>
6342         </class>
6343
6344         <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">
6345                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6346                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6347                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6348                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6349                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6350                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6351                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6352                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6353                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6354                 </fields>
6355                 <links>
6356                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6357                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6358                 </links>
6359                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6360                         <actions>
6361                                 <create permission="ADMIN_ACQ_FUND">
6362                     <context link="fund" field="org"/>
6363                 </create>
6364                                 <retrieve permission="ADMIN_ACQ_FUND">
6365                     <context link="fund" field="org"/>
6366                 </retrieve>
6367                                 <update permission="ADMIN_ACQ_FUND">
6368                     <context link="fund" field="org"/>
6369                 </update>
6370                                 <delete permission="ADMIN_ACQ_FUND">
6371                     <context link="fund" field="org"/>
6372                 </delete>
6373                         </actions>
6374                 </permacrud>
6375         </class>
6376
6377         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6378                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6379                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6380                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6381                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6382                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6383                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6384                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6385                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6386                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6387                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6388                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6389                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6390                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6391                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6392                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6393                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6394                 </fields>
6395                 <links>
6396                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6397                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6398             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6399             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6400             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6401                 </links>
6402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6403             <actions>
6404                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6405                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6406                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6407                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6408             </actions>
6409         </permacrud>
6410         </class>
6411
6412         <class id="acqfat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_allocation_total" reporter:label="Fund Allocation Total">
6413                 <fields oils_persist:primary="fund">
6414                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6415                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6416                 </fields>
6417                 <links>
6418                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6419                 </links>
6420         </class>
6421
6422         <class id="acqfdt" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_debit_total" reporter:label="Total Debit from Fund">
6423                 <fields oils_persist:primary="fund">
6424                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6425                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6426                 </fields>
6427                 <links>
6428                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6429                 </links>
6430         </class>
6431
6432         <class id="acqfet" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_encumbrance_total" reporter:label="Total Fund Encumbrance">
6433                 <fields oils_persist:primary="fund">
6434                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6435                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6436                 </fields>
6437                 <links>
6438                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6439                 </links>
6440         </class>
6441
6442         <class id="acqfst" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_total" reporter:label="Total Spent from Fund">
6443                 <fields oils_persist:primary="fund">
6444                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6445                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6446                 </fields>
6447                 <links>
6448                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6449                 </links>
6450         </class>
6451
6452         <class id="acqfcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_combined_balance" reporter:label="Fund Combined Balance">
6453                 <fields oils_persist:primary="fund">
6454                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6455                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6456                 </fields>
6457                 <links>
6458                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6459                 </links>
6460         </class>
6461
6462    <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">
6463         <fields oils_persist:primary="fund">
6464             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6465             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6466         </fields>
6467         <links>
6468             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6469         </links>
6470     </class>
6471
6472    <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">
6473         <fields oils_persist:primary="fund">
6474             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6475             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6476         </fields>
6477         <links>
6478             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6479         </links>
6480     </class>
6481
6482    <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">
6483         <fields oils_persist:primary="fund">
6484             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6485             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6486         </fields>
6487         <links>
6488             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6489         </links>
6490     </class>
6491
6492    <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">
6493         <fields oils_persist:primary="fund">
6494             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6495             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6496         </fields>
6497         <links>
6498             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6499         </links>
6500     </class>
6501
6502    <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">
6503         <fields oils_persist:primary="fund">
6504             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6505             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6506         </fields>
6507         <links>
6508             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6509         </links>
6510     </class>
6511
6512         <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">
6513                 <fields oils_persist:primary="funding_source">
6514                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6515                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6516                 </fields>
6517                 <links>
6518                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6519                 </links>
6520         </class>
6521
6522         <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">
6523                 <fields oils_persist:primary="funding_source">
6524                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6525                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6526                 </fields>
6527                 <links>
6528                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6529                 </links>
6530         </class>
6531
6532         <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">
6533                 <fields oils_persist:primary="funding_source">
6534                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6535                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6536                 </fields>
6537                 <links>
6538                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6539                 </links>
6540         </class>
6541
6542         <class id="acqfsb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_balance" reporter:label="Fund Spent Balance">
6543                 <fields oils_persist:primary="fund">
6544                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6545                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6546                 </fields>
6547                 <links>
6548                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6549                 </links>
6550         </class>
6551
6552         <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">
6553                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6554                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6555                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6556                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6557                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6558                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6559                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6560                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6561                 </fields>
6562                 <links>
6563                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6564                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6565                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6566                 </links>
6567                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6568                         <actions>
6569                                 <create permission="ADMIN_ACQ_FUND">
6570                     <context link="fund" field="org"/>
6571                 </create>
6572                                 <retrieve permission="ADMIN_ACQ_FUND">
6573                     <context link="fund" field="org"/>
6574                 </retrieve>
6575                                 <update permission="ADMIN_ACQ_FUND">
6576                     <context link="fund" field="org"/>
6577                 </update>
6578                                 <delete permission="ADMIN_ACQ_FUND">
6579                     <context link="fund" field="org"/>
6580                 </delete>
6581                         </actions>
6582                 </permacrud>
6583         </class>
6584
6585     <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">
6586         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6587             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6588             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6589             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6590             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6591             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6592             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6593             <field reporter:label="Note" name="note" reporter:datatype="text" />
6594             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6595         </fields>
6596         <links>
6597             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6598             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6599             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6600         </links>
6601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6602                         <actions>
6603                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6604                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6605                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6606                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6607                         </actions>
6608                 </permacrud>
6609     </class>
6610
6611         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6612                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6613                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6614                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6615                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6616                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6617                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6618                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6619                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6620                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6621                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6622                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6623                 </fields>
6624                 <links>
6625                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6626                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6627                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6628                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6629                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6630                 </links>
6631                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6632                         <actions>
6633                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6634                         </actions>
6635                 </permacrud>
6636         </class>
6637
6638         <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">
6639                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6640                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6641                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6642                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6643                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6644                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6645                 </fields>
6646                 <links>
6647                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6648                 </links>
6649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6650                         <actions>
6651                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6652                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6653                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6654                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6655                         </actions>
6656                 </permacrud>
6657         </class>
6658
6659         <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">
6660                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6661                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6662                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6663                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6664                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6665                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6666                         <field reporter:label="State" name="state" reporter:datatype="text" />
6667                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6668                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6669                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6670                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6671                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6672                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6673                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6674                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6675                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6676                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6677                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6678                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6679                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6680                 </fields>
6681                 <links>
6682                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6683                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6684                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6685                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6686                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6687                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6688                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6689                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6690                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6691                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6692                 </links>
6693                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6694                         <actions>
6695                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6696                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6697                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6698                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6699                         </actions>
6700                 </permacrud>
6701         </class>
6702
6703         <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">
6704                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6705                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6706                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6707                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6708                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6709                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6710                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6711                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6712                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6713                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6714                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6715                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6716                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6717                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6718                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6719                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6720                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6721                 </fields>
6722                 <links>
6723                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6724                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6725                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6726                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6727                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6728                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6729                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6730                 </links>
6731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6732             <actions>
6733                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6734             </actions>
6735                 </permacrud>
6736         </class>
6737
6738         <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">
6739                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6740                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6741                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6742                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6743                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6744                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6745                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6746                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6747                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6748                 </fields>
6749                 <links>
6750                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6751                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6752                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6753                 </links>
6754                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6755             <actions>
6756                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6757                     <context link="purchase_order" field="ordering_agency"/>
6758                 </retrieve>
6759                 <create permission="CREATE_PURCHASE_ORDER">
6760                     <context link="purchase_order" field="ordering_agency"/>
6761                 </create>
6762                 <update permission="CREATE_PURCHASE_ORDER">
6763                     <context link="purchase_order" field="ordering_agency"/>
6764                 </update>
6765                 <delete permission="CREATE_PURCHASE_ORDER">
6766                     <context link="purchase_order" field="ordering_agency"/>
6767                 </delete>
6768             </actions>
6769                 </permacrud>
6770         </class>
6771
6772         <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">
6773                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6774                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6775                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6776                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6777                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6778                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6779                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6780                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6781                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6782                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6783                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6784                 </fields>
6785                 <links>
6786                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6787                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6788                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6789                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6790                 </links>
6791                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6792             <actions>
6793                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6794                     <context link="purchase_order" field="ordering_agency"/>
6795                 </retrieve>
6796                 <create permission="CREATE_PURCHASE_ORDER">
6797                     <context link="purchase_order" field="ordering_agency"/>
6798                 </create>
6799                 <update permission="CREATE_PURCHASE_ORDER">
6800                     <context link="purchase_order" field="ordering_agency"/>
6801                 </update>
6802                 <delete permission="CREATE_PURCHASE_ORDER">
6803                     <context link="purchase_order" field="ordering_agency"/>
6804                 </delete>
6805             </actions>
6806                 </permacrud>
6807         </class>
6808
6809         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6810                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6811                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6812                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6813                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6814                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6815                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6816                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6817                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6818                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6819                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6820                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6821                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6822                         <field reporter:label="State" name="state" reporter:datatype="text" />
6823                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6824                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6825                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6826                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6827                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6828                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6829                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6830                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6831                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6832                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6833                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6834                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6835                 </fields>
6836                 <links>
6837                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6838                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6839                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6840                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6841                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6842                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6843                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6844                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6845                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6846                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6847                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6848                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6849                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6850                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6851                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6852                 </links>
6853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6854                         <actions>
6855                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6856                                         <context link="purchase_order" field="ordering_agency"/>
6857                                         <context link="picklist" field="org_unit"/>
6858                                 </retrieve>
6859                         </actions>
6860                 </permacrud>
6861         </class>
6862
6863         <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">
6864                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6865                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6866                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6867                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6868                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6869                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6870                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6871                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6872                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6873                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6874                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6875                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6876                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6877                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6878                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6879                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6880                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6881                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6882                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6883                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6884                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6885                 </fields>
6886                 <links>
6887                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6888                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6889                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6890                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6891                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6892                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6893                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6894                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6895                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6896                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6897                 </links>
6898                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6899                         <actions>
6900                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6901                                         <context link="purchase_order" field="ordering_agency"/>
6902                                         <context link="picklist" field="org_unit"/>
6903                                 </retrieve>
6904                         </actions>
6905                 </permacrud>
6906         </class>
6907
6908         <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">
6909                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6910                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6911                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6912                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6913                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6914                 </fields>
6915                 <links>
6916                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6917                 </links>
6918                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6919                         <actions>
6920                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6921                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6922                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6923                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6924                         </actions>
6925                 </permacrud>
6926         </class>
6927
6928         <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">
6929                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6930                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6931                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6932                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6933                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6934                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6935                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6936                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6937                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6938                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6939                 </fields>
6940                 <links>
6941                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6942                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6943                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6944                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6945                 </links>
6946         </class>
6947
6948         <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">
6949                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6950                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6951                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6952                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6953                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6954                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6955                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6956                 </fields>
6957                 <links>
6958                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6959                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6960                 </links>
6961         </class>
6962
6963         <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">
6964                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6965                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6966                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6967                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6968                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6969                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6970                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6971                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
6972                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6973                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6974                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6975                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6976                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6977                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6978                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6979                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6980                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6981                 </fields>
6982                 <links>
6983                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6984                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6985                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6986                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6987                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6988                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6989                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6990                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6991                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6992                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
6993                 </links>
6994         </class>
6995
6996         <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">
6997                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6998                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6999                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7000                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7001                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7002                 </fields>
7003                 <links/>
7004                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7005                         <actions>
7006                                 <retrieve />
7007                         </actions>
7008                 </permacrud>
7009         </class>
7010
7011         <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">
7012                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7013                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7014                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7015                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7016                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7017                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7018             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7019                 </fields>
7020                 <links/>
7021         <permacrud>
7022             <actions>
7023                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7024                 <retrieve />
7025                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7026                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7027             </actions>
7028         </permacrud>
7029         </class>
7030
7031         <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">
7032                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7033                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7034                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7035                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7036                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7037                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7038                 </fields>
7039                 <links/>
7040         </class>
7041         <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">
7042                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7043                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7044                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7045                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7046                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7047                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7048                 </fields>
7049                 <links>
7050                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7051                 </links>
7052         </class>
7053
7054         <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">
7055             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7056                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7057                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7058                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7059                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7060                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7061                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7062         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7063
7064             </fields>
7065             <links>
7066                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7067             </links>
7068             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7069                 <actions>
7070                     <create permission="ADMIN_PROVIDER">
7071                         <context link="provider" field="owner"/>
7072                     </create>
7073                     <retrieve permission="ADMIN_PROVIDER">
7074                         <context link="provider" field="owner"/>
7075                     </retrieve>
7076                     <update permission="ADMIN_PROVIDER">
7077                         <context link="provider" field="owner"/>
7078                     </update>
7079                     <delete permission="ADMIN_PROVIDER">
7080                         <context link="provider" field="owner"/>
7081                     </delete>
7082                 </actions>
7083             </permacrud>
7084         </class>
7085         
7086         <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">
7087             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7088                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7089                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7090                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7091                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7092             </fields>
7093             <links>
7094                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7095             </links>
7096             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7097                 <actions>
7098                     <create permission="ADMIN_PROVIDER">
7099                         <context link="provider" field="owner"/>
7100                     </create>
7101                     <retrieve permission="ADMIN_PROVIDER">
7102                         <context link="provider" field="owner"/>
7103                     </retrieve>
7104                     <update permission="ADMIN_PROVIDER">
7105                         <context link="provider" field="owner"/>
7106                     </update>
7107                     <delete permission="ADMIN_PROVIDER">
7108                         <context link="provider" field="owner"/>
7109                     </delete>
7110                 </actions>
7111             </permacrud>
7112         </class>
7113         
7114         <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">
7115             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7116                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7117                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7118                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7119                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7120                 </fields>
7121                 <links/>
7122         </class>
7123
7124         <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">
7125                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7126                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7127                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7128                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7129                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7130                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7131                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7132                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7133                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7134                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7135                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7136                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7137                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7138                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7139                 </fields>
7140                 <links>
7141                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7142                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7143                 </links>
7144         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7145             <actions>
7146                 <create permission="ADMIN_PROVIDER">
7147                     <context link="provider" field="owner"/>
7148                 </create>
7149                 <retrieve permission="ADMIN_PROVIDER">
7150                     <context link="provider" field="owner"/>
7151                 </retrieve>
7152                 <update permission="ADMIN_PROVIDER">
7153                     <context link="provider" field="owner"/>
7154                 </update>
7155                 <delete permission="ADMIN_PROVIDER">
7156                     <context link="provider" field="owner"/>
7157                 </delete>
7158             </actions>
7159         </permacrud>
7160         </class>
7161
7162         <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">
7163                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7164                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7165                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7166                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7167                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7168                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7169                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7170                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7171                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7172                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7173                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7174                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7175                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7176                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7177                 </fields>
7178                 <links>
7179                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7180                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7181                 </links>
7182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7183             <actions>
7184                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7185                     <context link="account" jump="provider" field="owner"/>
7186                 </retrieve>
7187                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7188                     <context link="account" jump="provider" field="owner"/>
7189                 </update>
7190                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7191                     <context link="account" jump="provider" field="owner"/>
7192                 </delete>
7193             </actions>
7194         </permacrud>
7195         </class>
7196
7197
7198         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7199                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7200                         <field name="id" reporter:datatype="id" />
7201                         <field name="parent" reporter:datatype="link"/>
7202                         <field name="owner" reporter:datatype="link"/>
7203                         <field name="create_time" reporter:datatype="timestamp"/>
7204                         <field name="name" reporter:datatype="text"/>
7205                         <field name="shared" reporter:datatype="bool"/>
7206                         <field name="share_with" reporter:datatype="link"/>
7207                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7208                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7209                 </fields>
7210                 <links>
7211                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7212                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7213                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7214                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7215                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7216                 </links>
7217         </class>
7218         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7219                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7220                         <field name="id" reporter:datatype="id" />
7221                         <field name="parent" reporter:datatype="link"/>
7222                         <field name="owner" reporter:datatype="link"/>
7223                         <field name="create_time" reporter:datatype="timestamp"/>
7224                         <field name="name" reporter:datatype="text"/>
7225                         <field name="shared" reporter:datatype="bool"/>
7226                         <field name="share_with" reporter:datatype="link"/>
7227                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7228                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7229                 </fields>
7230                 <links>
7231                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7232                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7233                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7234                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7235                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7236                 </links>
7237         </class>
7238         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7239                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7240                         <field name="id" reporter:datatype="id" />
7241                         <field name="parent" reporter:datatype="link"/>
7242                         <field name="owner" reporter:datatype="link"/>
7243                         <field name="create_time" reporter:datatype="timestamp"/>
7244                         <field name="name" reporter:datatype="text"/>
7245                         <field name="shared" reporter:datatype="bool"/>
7246                         <field name="share_with" reporter:datatype="link"/>
7247                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7248                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7249                 </fields>
7250                 <links>
7251                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7252                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7253                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7254                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7255                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7256                 </links>
7257         </class>
7258         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7259                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7260                         <field name="id" reporter:datatype="id" />
7261                         <field name="owner" reporter:datatype="link"/>
7262                         <field name="create_time" reporter:datatype="timestamp"/>
7263                         <field name="name" reporter:datatype="text"/>
7264                         <field name="data" reporter:datatype="text"/>
7265                         <field name="folder" reporter:datatype="link"/>
7266                         <field name="description" reporter:datatype="text"/>
7267                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7268                 </fields>
7269                 <links>
7270                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7271                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7272                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7273                 </links>
7274         </class>
7275         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7276                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7277                         <field name="id" reporter:datatype="id" />
7278                         <field name="owner" reporter:datatype="link"/>
7279                         <field name="create_time" reporter:datatype="timestamp"/>
7280                         <field name="template" reporter:datatype="link"/>
7281                         <field name="data" reporter:datatype="text"/>
7282                         <field name="folder" reporter:datatype="link"/>
7283                         <field name="recur" reporter:datatype="bool"/>
7284                         <field name="recurrence" reporter:datatype="interval"/>
7285                         <field name="name" reporter:datatype="text"/>
7286                         <field name="description" reporter:datatype="text"/>
7287                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7288                 </fields>
7289                 <links>
7290                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7291                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7292                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7293                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7294                 </links>
7295         </class>
7296         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7297                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7298                         <field name="id" reporter:datatype="id" />
7299                         <field name="runner" reporter:datatype="link"/>
7300                         <field name="start_time" reporter:datatype="timestamp"/>
7301                         <field name="complete_time" reporter:datatype="timestamp"/>
7302                         <field name="run_time" reporter:datatype="timestamp"/>
7303                         <field name="email" reporter:datatype="text"/>
7304                         <field name="excel_format" reporter:datatype="bool"/>
7305                         <field name="csv_format" reporter:datatype="bool"/>
7306                         <field name="html_format" reporter:datatype="bool"/>
7307                         <field name="error_code" reporter:datatype="int"/>
7308                         <field name="error_text" reporter:datatype="text"/>
7309                         <field name="report" reporter:datatype="link"/>
7310                         <field name="folder" reporter:datatype="link"/>
7311                         <field name="chart_pie" reporter:datatype="bool"/>
7312                         <field name="chart_bar" reporter:datatype="bool"/>
7313                         <field name="chart_line" reporter:datatype="bool"/>
7314                 </fields>
7315                 <links>
7316                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7317                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7318                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7319                 </links>
7320         </class>
7321         <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">
7322                 <fields oils_persist:primary="id">
7323                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7324                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7325                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7326                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7327                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7328                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7329                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7330                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7331                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7332                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7333                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7334                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7335                 </fields>
7336                 <links>
7337                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7338                 </links>
7339         </class>
7340         <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">
7341                 <fields oils_persist:primary="id">
7342                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7343                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7344                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7345                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7346                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7347                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7348                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7349                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7350                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7351                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7352                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7353                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7354                 </fields>
7355                 <links>
7356                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7357                 </links>
7358         </class>
7359         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7360                 <fields oils_persist:primary="id">
7361                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7362                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7363                         <field reporter:label="Fingerprint" name="fingerprint" />
7364                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7365                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7366                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7367                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7368                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7369                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7370                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7371                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7372                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7373                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7374                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7375                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7376                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7377                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7378                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7379                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7380                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7381                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7382                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7383                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7384                 </fields>
7385                 <links>
7386                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7387                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7388                 </links>
7389         </class>
7390         <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">
7391                 <fields oils_persist:primary="id">
7392                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7393                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7394                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7395                 </fields>
7396                 <links>
7397                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7398                 </links>
7399         </class>
7400         <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">
7401                 <fields oils_persist:primary="id">
7402                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7403                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7404                 </fields>
7405                 <links>
7406                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7407                 </links>
7408         </class>
7409         <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">
7410                 <fields oils_persist:primary="id">
7411                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7412                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7413                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7414                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7415                 </fields>
7416                 <links>
7417                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7418                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7419                 </links>
7420         </class>
7421         <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">
7422                 <fields oils_persist:primary="xact">
7423                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7424                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7425                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7426                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7427                 </fields>
7428                 <links>
7429                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7430                 </links>
7431         </class>
7432         <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">
7433                 <fields oils_persist:primary="xact">
7434                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7435                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7436                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7437                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7438                 </fields>
7439                 <links>
7440                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7441                 </links>
7442         </class>
7443         <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)">
7444                 <fields oils_persist:primary="id">
7445                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7446                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7447                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7448                 </fields>
7449                 <links>
7450                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7451                 </links>
7452         </class>
7453         <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">
7454                 <fields oils_persist:primary="id">
7455                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7456                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7457                 </fields>
7458                 <links>
7459                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7460                 </links>
7461         </class>
7462         <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">
7463                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7464                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7465                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7466                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7467                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7468                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7469                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7470                 </fields>
7471                 <links>
7472                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7473                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7474                 </links>
7475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7476                         <actions>
7477                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7478                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7479                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7480                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7481                         </actions>
7482                 </permacrud>
7483         </class>
7484         <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">
7485                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7486                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7487                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7488                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7489                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7490                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7491                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7492                 </fields>
7493                 <links>
7494                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7495                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7496                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7497                 </links>
7498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7499                         <actions>
7500                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7501                                         <context link="formula" field="owner"/>
7502                                 </create>
7503                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7504                                         <context link="formula" field="owner"/>
7505                                 </retrieve>
7506                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7507                                         <context link="formula" field="owner"/>
7508                                 </update>
7509                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7510                                         <context link="formula" field="owner"/>
7511                                 </delete>
7512                         </actions>
7513                 </permacrud>
7514         </class>
7515
7516         <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">
7517                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7518                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7519                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7520                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7521                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7522                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7523                 </fields>
7524                 <links>
7525                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7526                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7527                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7528                 </links>
7529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7530                         <actions>
7531                                 <create permission="CREATE_PURCHASE_ORDER">
7532                                         <context link="formula" field="owner"/>
7533                 </create>
7534                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7535                                         <context link="formula" field="owner"/>
7536                 </retrieve>
7537                                 <update permission="CREATE_PURCHASE_ORDER">
7538                                         <context link="formula" field="owner"/>
7539                 </update>
7540                                 <delete permission="CREATE_PURCHASE_ORDER">
7541                                         <context link="formula" field="owner"/>
7542                 </delete>
7543                         </actions>
7544                 </permacrud>
7545         </class>
7546
7547         <class id="acqda" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
7548                 <fields oils_persist:primary="id">
7549                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7550                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7551                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7552                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7553                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7554                 </fields>
7555                 <links>
7556                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7557                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7558                 </links>
7559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7560                 </permacrud>
7561         </class>
7562
7563         <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">
7564                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7565                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7566                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7567                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7568                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7569                 </fields>
7570                 <links>
7571                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7572                 </links>
7573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7574                         <actions>
7575                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7576                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7577                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7578                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7579                         </actions>
7580                 </permacrud>
7581         </class>
7582
7583         <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">
7584                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7585                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7586                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7587                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7588                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7589                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7590                 </fields>
7591                 <links>
7592                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7593                 </links>
7594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7595                         <actions>
7596                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7597                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7598                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7599                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7600                         </actions>
7601                 </permacrud>
7602         </class>
7603
7604         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7605                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7606                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7607                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7608                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7609                 </fields>
7610                 <links>
7611                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7612                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7613                 </links>
7614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7615                 </permacrud>
7616         </class>
7617
7618         <class id="acqcle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
7619                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7620                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7621                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7622                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7623                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7624                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7625                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7626                 </fields>
7627                 <links>
7628                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7629                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7630                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7631                 </links>
7632                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7633                 </permacrud>
7634         </class>
7635
7636         <class id="acqscl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
7637                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7638                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7639                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7640                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7641                 </fields>
7642                 <links>
7643                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7644                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7645                 </links>
7646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7647                 </permacrud>
7648         </class>
7649
7650         <class id="acqscle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
7651                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7652                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7653                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7654                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7655                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7656                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7657                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7658                 </fields>
7659                 <links>
7660                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7661                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7662                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7663                 </links>
7664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7665                 </permacrud>
7666         </class>
7667
7668         <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">
7669                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7670                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7671                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7672                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7673                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7674                 </fields>
7675                 <links>
7676                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7677                 </links>
7678                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7679             <actions>
7680                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7681                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7682                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7683                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7684             </actions>
7685                 </permacrud>
7686         </class>
7687
7688         <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">
7689                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7690                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7691                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7692                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7693                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7694                 </fields>
7695                 <links>
7696                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7697                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7698                 </links>
7699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7700                         <actions>
7701                                 <create permission="ADMIN_CLAIM_POLICY">
7702                                         <context link="claim_policy" field="org_unit"/>
7703                 </create>
7704                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7705                                         <context link="claim_policy" field="org_unit"/>
7706                 </retrieve>
7707                                 <update permission="ADMIN_CLAIM_POLICY">
7708                                         <context link="claim_policy" field="org_unit"/>
7709                 </update>
7710                                 <delete permission="ADMIN_CLAIM_POLICY">
7711                                         <context link="claim_policy" field="org_unit"/>
7712                 </delete>
7713                         </actions>
7714                 </permacrud>
7715         </class>
7716
7717     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7718         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7719             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7720             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7721             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7722             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7723             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7724             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7725             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7726             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7727             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7728             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7729             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7730             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7731             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7732             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7733             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7734         </fields>
7735     </class>
7736
7737     <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">
7738         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7739             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7740             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7741             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7742             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7743             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7744         </fields>
7745     </class>
7746
7747     <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">
7748         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7749             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7750             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7751             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7752             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7753             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7754             <field reporter:label="City" name="city" reporter:datatype="text"/>
7755             <field reporter:label="State" name="state" reporter:datatype="text"/>
7756             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7757             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7758             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7759         </fields>
7760     </class>
7761
7762     <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">
7763         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7764             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7765             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7766             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7767             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7768             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7769             <field reporter:label="City" name="city" reporter:datatype="text"/>
7770             <field reporter:label="State" name="state" reporter:datatype="text"/>
7771             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7772             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7773             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7774         </fields>
7775     </class>
7776
7777     <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">
7778         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7779             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7780             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7781             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7782             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7783             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7784             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7785         </fields>
7786     </class>
7787
7788         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7789                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7790                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7791                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7792                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7793                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7794                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7795                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7796                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7797                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7798                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7799                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7800                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7801                 </fields>
7802                 <links>
7803                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7804                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7805                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7806                 </links>
7807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7808                 </permacrud>
7809         </class>
7810
7811         <class id="afscv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
7812                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7813                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7814                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7815                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7816                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7817                 </fields>
7818                 <links>
7819                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7820                 </links>
7821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7822                 </permacrud>
7823         </class>
7824
7825     <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">
7826         <fields>
7827             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7828             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7829             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7830         </fields>
7831                 <links>
7832                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7833                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7834                 </links>
7835     </class>
7836
7837     <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">
7838         <fields>
7839             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7840             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7841         </fields>
7842                 <links>
7843                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7844                 </links>
7845     </class>
7846
7847     <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">
7848         <fields>
7849             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7850             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7851             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7852         </fields>
7853                 <links>
7854                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7855                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7856                 </links>
7857     </class>
7858
7859     <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">
7860         <fields>
7861             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7862             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7863         </fields>
7864                 <links>
7865                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7866                 </links>
7867     </class>
7868
7869     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7870                 <oils_persist:source_definition>
7871
7872             SELECT  DISTINCT l.*
7873               FROM  action.unfulfilled_hold_loops l
7874                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7875               WHERE l.count = m.max
7876
7877                 </oils_persist:source_definition>
7878         <fields>
7879             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7880             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7881             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7882         </fields>
7883                 <links>
7884                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7885                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7886                 </links>
7887     </class>
7888
7889         <class id="qsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
7890                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7891                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7892                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7893                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7894                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7895                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7896                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7897                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7898                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7899                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7900                 </fields>
7901                 <links>
7902                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7903                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7904                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7905                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7906                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7907                 </links>
7908                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7909                 </permacrud>
7910         </class>
7911
7912         <class id="qseq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
7913                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7914                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7915                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7916                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7917                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7918                 </fields>
7919                 <links>
7920                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7921                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7922                 </links>
7923                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7924                 </permacrud>
7925         </class>
7926
7927         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7928                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7929                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7930                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7931                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7932                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7933                 </fields>
7934                 <links>
7935                 </links>
7936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7937                 </permacrud>
7938         </class>
7939
7940         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7941                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7942                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7943                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7944                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7945                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7946                 </fields>
7947                 <links>
7948                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7949                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7950                 </links>
7951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7952                 </permacrud>
7953         </class>
7954         
7955         <class id="qfs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
7956                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7957                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7958                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7959                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7960                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7961                 </fields>
7962                 <links>
7963                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7964                 </links>
7965                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7966                 </permacrud>
7967         </class>
7968         
7969         <class id="qfpd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
7970                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7971                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7972                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7973                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7974                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7975                 </fields>
7976                 <links>
7977                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7978                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7979                 </links>
7980                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7981                 </permacrud>
7982         </class>
7983
7984         <class id="qbv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
7985                 <fields oils_persist:primary="name">
7986                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7987                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7988                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7989                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7990                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7991                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7992                 </fields>
7993                 <links>
7994                 </links>
7995                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7996                 </permacrud>
7997         </class>
7998
7999         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8000                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8001                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8002                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8003                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8004                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8005                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8006                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8007                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8008                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8009                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8010                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8011                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8012                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8013                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8014                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8015                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8016                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8017                 </fields>
8018                 <links>
8019                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8020                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8021                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8022                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8023                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8024                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8025                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8026                 </links>
8027                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8028                 </permacrud>
8029         </class>
8030
8031         <class id="qcb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8032                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8033                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8034                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8035                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8036                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8037                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8038                 </fields>
8039                 <links>
8040                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8041                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8042                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8043                 </links>
8044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8045                 </permacrud>
8046         </class>
8047
8048         <class id="qfr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8049                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8050                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8051                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8052                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8053                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8054                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8055                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8056                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8057                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8058                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8059                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8060                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8061                 </fields>
8062                 <links>
8063                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8064                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8065                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8066                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8067                 </links>
8068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8069                 </permacrud>
8070         </class>
8071
8072         <class id="qrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8073                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8074                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8075                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8076                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8077                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8078                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8079                 </fields>
8080                 <links>
8081                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8082                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8083                 </links>
8084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8085                 </permacrud>
8086         </class>
8087
8088         <class id="qsi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8089                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8090                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8091                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8092                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8093                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8094                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8095                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8096                 </fields>
8097                 <links>
8098                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8099                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8100                 </links>
8101                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8102                 </permacrud>
8103         </class>
8104
8105         <class id="qobi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
8106                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8107                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8108                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8109                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8110                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8111                 </fields>
8112                 <links>
8113                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8114                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8115                 </links>
8116                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8117                 </permacrud>
8118         </class>
8119
8120         <class id="xbet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8121                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8122                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8123                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8124                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8125                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8126                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8127                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8128                 </fields>
8129                 <links>
8130                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8131                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8132                 </links>
8133                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8134                 </permacrud>
8135         </class>
8136
8137         <class id="xbind" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8138                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8139                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8140                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8141                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8142                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8143                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8144                 </fields>
8145                 <links>
8146                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8147                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8148                 </links>
8149                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8150                 </permacrud>
8151         </class>
8152
8153         <class id="xbool" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8154                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8155                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8156                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8157                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8158                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8159                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8160                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8161                 </fields>
8162                 <links>
8163                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8164                 </links>
8165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8166                 </permacrud>
8167         </class>
8168
8169         <class id="xcase" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
8170                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8171                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8172                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8173                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8174                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8175                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8176                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8177                 </fields>
8178                 <links>
8179                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8180                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8181                 </links>
8182                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8183                 </permacrud>
8184         </class>
8185
8186         <class id="xcast" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
8187                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8188                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8189                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8190                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8191                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8192                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8193                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8194                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8195                 </fields>
8196                 <links>
8197                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8198                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8199                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8200                 </links>
8201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8202                 </permacrud>
8203         </class>
8204
8205         <class id="xcol" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
8206                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8207                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8208                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8209                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8210                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8211                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8212                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8213                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8214                 </fields>
8215                 <links>
8216                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8217                 </links>
8218                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8219                 </permacrud>
8220         </class>
8221
8222         <class id="xex" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
8223                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8224                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8225                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8226                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8227                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8228                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8229                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8230                 </fields>
8231                 <links>
8232                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8233                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8234                 </links>
8235                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8236                 </permacrud>
8237         </class>
8238
8239         <class id="xfunc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
8240                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8241                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8242                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8243                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8244                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8245                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8246                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8247                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8248                 </fields>
8249                 <links>
8250                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8251                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8252                 </links>
8253                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8254                 </permacrud>
8255         </class>
8256
8257         <class id="xin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
8258                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8259                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8260                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8261                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8262                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8263                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8264                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8265                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8266                 </fields>
8267                 <links>
8268                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8269                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8270                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8271                 </links>
8272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8273                 </permacrud>
8274         </class>
8275
8276         <class id="xisnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
8277                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8278                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8279                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8280                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8281                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8282                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8283                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8284                 </fields>
8285                 <links>
8286                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8287                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8288                 </links>
8289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8290                 </permacrud>
8291         </class>
8292
8293         <class id="xnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
8294                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8295                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8296                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8297                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8298                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8299                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8300                 </fields>
8301                 <links>
8302                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8303                 </links>
8304                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8305                 </permacrud>
8306         </class>
8307
8308         <class id="xnum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
8309                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8310                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8311                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8312                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8313                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8314                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8315                 </fields>
8316                 <links>
8317                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8318                 </links>
8319                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8320                 </permacrud>
8321         </class>
8322
8323         <class id="xop" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
8324                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8325                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8326                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8327                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8328                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8329                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8330                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8331                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8332                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8333                 </fields>
8334                 <links>
8335                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8336                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8337                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8338                 </links>
8339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8340                 </permacrud>
8341         </class>
8342
8343         <class id="xser" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
8344                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8345                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8346                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8347                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8348                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8349                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8350                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8351                 </fields>
8352                 <links>
8353                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8354                 </links>
8355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8356                 </permacrud>
8357         </class>
8358
8359         <class id="xstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
8360                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8361                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8362                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8363                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8364                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8365                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8366                 </fields>
8367                 <links>
8368                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8369                 </links>
8370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8371                 </permacrud>
8372         </class>
8373
8374         <class id="xsubq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
8375                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8376                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8377                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8378                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8379                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8380                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8381                 </fields>
8382                 <links>
8383                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8384                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8385                 </links>
8386                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8387                 </permacrud>
8388         </class>
8389
8390         <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">
8391                 <fields oils_persist:primary="id">
8392                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8393                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8394                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8395                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8396                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8397                 </fields>
8398                 <links>
8399                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8400                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8401                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8402                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8403                 </links>
8404         </class>
8405
8406         <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">
8407                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8408                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8409                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8410                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8411                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8412                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8413                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8414                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8415                 </fields>
8416                 <links/>
8417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8418                         <actions>
8419                                 <retrieve/>
8420                         </actions>
8421                 </permacrud>
8422         </class>
8423
8424         <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">
8425                 <fields oils_persist:primary="ptype_key">
8426                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8427                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8428                 </fields>
8429                 <links/>
8430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8431                         <actions>
8432                                 <retrieve/>
8433                         </actions>
8434                 </permacrud>
8435         </class>
8436
8437         <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">
8438                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8439                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8440                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8441                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8442                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8443                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8444                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8445                 </fields>
8446                 <links>
8447                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8448                 </links>
8449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8450                         <actions>
8451                                 <retrieve/>
8452                         </actions>
8453                 </permacrud>
8454         </class>
8455
8456         <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">
8457                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8458                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8459                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8460                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8461                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8462                 </fields>
8463                 <links>
8464                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8465                 </links>
8466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8467                         <actions>
8468                                 <retrieve/>
8469                         </actions>
8470                 </permacrud>
8471         </class>
8472
8473         <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">
8474                 <fields oils_persist:primary="code">
8475                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8476                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8477                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8478                 </fields>
8479                 <links/>
8480                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8481                         <actions>
8482                                 <retrieve/>
8483                         </actions>
8484                 </permacrud>
8485         </class>
8486
8487         <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">
8488                 <oils_persist:source_definition>
8489
8490             SELECT  b.id,
8491                     MAX(dcp.edit_date) AS last_delete_date
8492              FROM   biblio.record_entry b
8493                     JOIN asset.call_number cn ON (cn.record = b.id)
8494                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8495              WHERE  NOT b.deleted
8496              GROUP BY b.id
8497              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8498
8499                 </oils_persist:source_definition>
8500                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8501                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8502                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8503                 </fields>
8504                 <links>
8505                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8506                 </links>
8507                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8508                         <actions>
8509                                 <retrieve/>
8510                         </actions>
8511                 </permacrud>
8512         </class>
8513
8514         <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">
8515                 <oils_persist:source_definition>
8516
8517             -- -- 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.
8518             -- -- 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
8519             -- -- may not.
8520             -- SELECT
8521             --     bre.id AS "bib_id",
8522             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8523             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8524             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8525             -- FROM (
8526                 SELECT
8527                     y.bre AS "id",
8528                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8529                     y.hold_count AS "hold_count",
8530                     (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"
8531                 FROM (
8532                         SELECT
8533                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8534                             COUNT(*) AS "hold_count"
8535                         FROM action.hold_request h
8536                         WHERE
8537                             cancel_time IS NULL
8538                             AND fulfillment_time IS NULL
8539                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8540                         GROUP BY 1
8541                     )y LEFT JOIN (
8542                         SELECT 
8543                             (SELECT id
8544                                 FROM biblio.record_entry 
8545                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8546                             ) AS "bre", 
8547                             COUNT(*) AS "copy_count"
8548                         FROM asset.copy
8549                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8550                         WHERE copy.holdable 
8551                             AND NOT copy.deleted 
8552                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8553                         GROUP BY 1
8554                     )x ON x.bre = y.bre
8555                 -- )z RIGHT JOIN (
8556                 --     SELECT id
8557                 --     FROM biblio.record_entry
8558                 --     WHERE NOT deleted
8559                 -- )bre ON (z.bib_id = bre.id)
8560                 
8561
8562                 </oils_persist:source_definition>
8563                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8564                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8565                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8566                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8567                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8568                 </fields>
8569                 <links>
8570                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8571                 </links>
8572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8573                         <actions>
8574                                 <retrieve/>
8575                         </actions>
8576                 </permacrud>
8577         </class>
8578
8579         <!-- ********************************************************************************************************************* -->
8580         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8581         <!-- ********************************************************************************************************************* -->
8582         <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">
8583                 <fields oils_persist:primary="id">
8584                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8585                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8586                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8587                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8588                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8589                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8590                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8591                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8592                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8593                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8594                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8595                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8596                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8597                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8598                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8599                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8600                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8601                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8602                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8603                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8604                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8605                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8606                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8607                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8608                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8609                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8610                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8611                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8612                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8613                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8614                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8615                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8616                 </fields>
8617                 <links>
8618                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8619                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8620                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8621                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8622                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8623                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8624                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8625                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8626                 </links>
8627         </class>
8628
8629         <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">
8630                 <fields oils_persist:primary="id">
8631                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8632                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8633                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8634                 </fields>
8635                 <links>
8636                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8637                 </links>
8638         </class>
8639
8640         <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">
8641                 <fields oils_persist:primary="id">
8642                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8643                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8644                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8645                 </fields>
8646                 <links>
8647                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8648                 </links>
8649         </class>
8650
8651         <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">
8652                 <fields oils_persist:primary="id">
8653                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8654
8655                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8656                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8657                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8658
8659                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8660                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8661                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8662
8663                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8664                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8665
8666                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8667                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8668                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8669
8670                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8671                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8672
8673                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8674                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8675                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8676
8677                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8678                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8679                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8680
8681                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8682                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8683                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8684                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8685
8686                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8687                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8688
8689                 </fields>
8690                 <links>
8691                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8692                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8693                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8694                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8695                 </links>
8696         </class>
8697
8698         <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">
8699                 <oils_persist:source_definition>
8700
8701             SELECT
8702                 po.ordering_agency AS ordering_agency,
8703                 po.id AS purchase_order,
8704                 li.id AS lineitem,
8705                 lid.id AS lineitem_detail,
8706                 cpa.id AS claim_policy_action
8707             FROM
8708                 acq.lineitem_detail lid
8709                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8710                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8711                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8712                 JOIN acq.claim_policy_action cpa ON (
8713                     cpa.claim_policy = cp.id
8714
8715                     -- we only care about claim policy actions whose claim
8716                     -- interval we'd reached or exceeded
8717                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8718
8719                     -- filter out all claim policy actions where claim events
8720                     -- have occurred on or after the action's action_interval
8721                     AND NOT EXISTS (
8722                         SELECT 1
8723                         FROM
8724                             acq.claim_event evt
8725                             JOIN acq.claim claim ON (
8726                                 claim.id = evt.claim
8727                                 AND claim.lineitem_detail = lid.id
8728                             )
8729                         WHERE
8730                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8731                     )
8732                 )
8733             WHERE
8734                 lid.cancel_reason IS NULL
8735                 AND li.cancel_reason IS NULL -- belt/suspenders
8736                 AND po.cancel_reason IS NULL -- belt/suspenders
8737                 AND lid.recv_time IS NULL
8738                 AND po.state = 'on-order'
8739             ORDER BY 1, 2, 3, 4, 5
8740
8741                 </oils_persist:source_definition>
8742                 <fields>
8743                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8744                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8745                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8746                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8747                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8748                 </fields>
8749                 <links>
8750                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8751                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8752                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8753                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8754                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8755                 </links>
8756         </class>
8757
8758         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8759                 <oils_persist:source_definition>
8760
8761             SELECT 
8762                 li.id AS lineitem, 
8763                 (
8764                     SELECT COUNT(lid.id) 
8765                     FROM acq.lineitem_detail lid
8766                     WHERE lineitem = li.id
8767                 ) AS item_count,
8768                 (
8769                     SELECT COUNT(lid.id) 
8770                     FROM acq.lineitem_detail lid
8771                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8772                 ) AS recv_count,
8773                 (
8774                     SELECT COUNT(lid.id) 
8775                     FROM acq.lineitem_detail lid
8776                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8777                 ) AS cancel_count,
8778                 (
8779                     SELECT COUNT(lid.id) 
8780                     FROM acq.lineitem_detail lid
8781                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8782                     WHERE NOT debit.encumbrance AND lineitem = li.id
8783                 ) AS invoice_count,
8784                 (
8785                     SELECT COUNT(DISTINCT(lid.id)) 
8786                     FROM acq.lineitem_detail lid
8787                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8788                     WHERE lineitem = li.id
8789                 ) AS claim_count,
8790                 (
8791                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8792                     FROM acq.lineitem_detail lid
8793                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8794                 ) AS estimated_amount,
8795                 (
8796                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8797                     FROM acq.lineitem_detail lid
8798                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8799                     WHERE debit.encumbrance AND lineitem = li.id
8800                 ) AS encumbrance_amount,
8801                 (
8802                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8803                     FROM acq.lineitem_detail lid
8804                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8805                     WHERE NOT debit.encumbrance AND lineitem = li.id
8806                 ) AS paid_amount
8807
8808                 FROM acq.lineitem AS li
8809         </oils_persist:source_definition>
8810                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8811                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8812                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8813                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8814                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8815                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8816                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8817                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8818                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8819                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8820                 </fields>
8821                 <links>
8822                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8823                 </links>
8824     </class>
8825
8826
8827         <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">
8828                 <oils_persist:source_definition>
8829
8830                         SELECT  t.*
8831                           FROM  action.transit_copy t
8832                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8833                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8834                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8835
8836                 </oils_persist:source_definition>
8837                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8838                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8839                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8840                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8841                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8842                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8843                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8844                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8845                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8846                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8847                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8848                 </fields>
8849                 <links>
8850                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8851                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8852                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8853                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8854                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8855                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8856                 </links>
8857         </class>
8858
8859     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8860                 <oils_persist:source_definition>
8861
8862         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8863                 SELECT
8864                         cp.id as copy,
8865                         COUNT(circ.id),
8866                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8867                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8868                 FROM
8869                         asset.copy cp
8870                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8871                 GROUP BY 1, 3, 4
8872                 UNION
8873                 SELECT
8874                         cp.id as copy,
8875                         COUNT(circ.id),
8876                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8877                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8878                 FROM
8879                         asset.copy cp
8880                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8881                 GROUP BY 1, 3, 4
8882                 UNION
8883                 SELECT
8884                         id as copy,
8885                         circ_count,
8886                         -1 AS year,
8887                         false as is_renewal
8888                 FROM
8889                         extend_reporter.legacy_circ_count
8890         )x GROUP BY 1, 3, 4
8891
8892                 </oils_persist:source_definition>
8893         <fields>
8894             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8895             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8896             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8897             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8898         </fields>
8899                 <links>
8900                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8901                 </links>
8902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8903                         <actions>
8904                                 <retrieve/>
8905                         </actions>
8906                 </permacrud>
8907     </class>
8908
8909         <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">
8910                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8911                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8912                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8913                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8914                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8915                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8916                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8917                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8918                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8919                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8920                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8921                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8922                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8923                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8924                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8925                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8926                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8927                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8928                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8929                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8930                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8931                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8932                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8933                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8934                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8935                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8936                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8937                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8938                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8939                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8940                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8941                 </fields>
8942                 <links>
8943                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8944                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8945                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8946                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8947                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8948                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8949                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8950                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8951                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8952                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8953                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8954                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8955                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8956                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8957                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8958                 </links>
8959         </class>
8960
8961     <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">
8962         <fields oils_persist:primary="id">
8963             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8964             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8965             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8966             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8967             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8968             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8969             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8970             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8971             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8972             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8973             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8974             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8975             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8976             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8977             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8978             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8979             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8980             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8981             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8982             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8983             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8984             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8985             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8986             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8987             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8988             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8989             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8990             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8991             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8992             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8993             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8994             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8995             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8996             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8997         </fields>
8998         <links>
8999             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9000             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9001             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9002             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9003             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9004         </links>
9005     </class>
9006
9007     <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">
9008         <fields oils_persist:primary="id">
9009             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9010             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9011             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9012             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9013         </fields>
9014         <links>
9015             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9016             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9017         </links>
9018     </class>
9019
9020     <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">
9021         <fields oils_persist:primary="owning_lib">
9022             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9023             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9024             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9025         </fields>
9026         <links>
9027             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9028         </links>
9029     </class>
9030
9031     <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">
9032         <fields oils_persist:primary="id">
9033             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9034             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9035             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9036             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9037             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9038         </fields>
9039         <links>
9040             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9041             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9042             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9043         </links>
9044     </class>
9045
9046     <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">
9047         <fields oils_persist:primary="circ_lib">
9048             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9049             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9050             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9051             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9052         </fields>
9053         <links>
9054             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9055             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9056         </links>
9057     </class>
9058
9059     <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">
9060         <fields oils_persist:primary="id">
9061             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9062             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9063             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9064             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9065             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9066         </fields>
9067         <links>
9068             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9069             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9070             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9071         </links>
9072     </class>
9073
9074     <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">
9075         <fields oils_persist:primary="home_ou">
9076             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9077             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9078             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9079             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9080         </fields>
9081         <links>
9082             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9083             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9084         </links>
9085     </class>
9086         <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">
9087                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9088                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9089                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9090                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9091                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9092                 </fields>
9093                 <links>
9094                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9095                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9096                 </links>
9097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9098                         <actions>
9099                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9100                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9101                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9102                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9103                         </actions>
9104                 </permacrud>
9105         </class>
9106         <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">
9107                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9108                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9109                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9110                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9111                 </fields>
9112                 <links>
9113                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9114                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9115                         </links>
9116                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9117                 <actions>
9118                                 <create permission="ADMIN_ACQ_FUND_TAG">
9119                                         <context link="tag" field="owner"/>
9120                                 </create>
9121                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9122                                         <context link="tag" field="owner"/>
9123                                 </retrieve>
9124                                 <update permission="ADMIN_ACQ_FUND_TAG">
9125                                         <context link="tag" field="owner"/>
9126                                 </update>
9127                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9128                                         <context link="tag" field="owner"/>
9129                                 </delete>
9130                         </actions>
9131                 </permacrud>
9132         </class>
9133         <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">
9134                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9135                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9136                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9137                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9138                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9139                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9140                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9141                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9142                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9143                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9144                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9145                 </fields>
9146                 <links>
9147                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9148                 </links>
9149                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9150                         <actions>
9151                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9152                                 <retrieve/>
9153                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9154                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9155                         </actions>
9156                 </permacrud>
9157         </class>
9158
9159         <!-- ********************************************************************************************************************* -->
9160
9161 </IDL>
9162
9163 <!--
9164     vim:noet:ts=4:sw=4:
9165 -->