]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Email notification of reservation capture
[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="billing_location" reporter:datatype="link"/>
2535                 </fields>
2536                 <links>
2537                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2538                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2539                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2540                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2541                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2542                 </links>
2543         </class>
2544         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2545                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2546                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2547                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2548                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2549                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2550                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2551                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2552                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2553                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2554                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2555                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2556                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2557                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2558                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2559                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2560                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2561                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2562                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2563                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2564                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2565                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2566                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2567                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2568                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2569                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2570                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2571                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2572                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2573                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2574                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2575                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2576                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2577                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2578                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2579                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2580                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2581                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2582                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2583                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2584                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2585                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2586                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2587                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2588                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2589                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2590                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2591                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2592                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2593                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2594                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2595                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2596                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2597                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2598                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2599                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2600                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2601                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2602                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2603                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2604                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2605                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2606                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2607                 </fields>
2608                 <links>
2609                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2610                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2611                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2612                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2613                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2614                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2615                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2616                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2617                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2618                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2619                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2620                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2621                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2622                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2623                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2624                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2625                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2626                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2627                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2628                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2629                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2630                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2631                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2632                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2633                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2634                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2635                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2636                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2637                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2638                 </links>
2639         </class>
2640
2641         <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">
2642                 <fields oils_persist:primary="name">
2643                         <field name="name" reporter:datatype="text"/>
2644                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2645                 </fields>
2646                 <links/>
2647                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2648                         <actions>
2649                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2650                                 <retrieve/>
2651                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2652                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2653                         </actions>
2654                 </permacrud>
2655         </class>
2656         <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">
2657                 <fields oils_persist:primary="name">
2658                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2659                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2660                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2661                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2662                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2663                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2664                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2665                 </fields>
2666                 <links>
2667                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2668                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2669                 </links>
2670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2671                         <actions>
2672                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2673                                 <retrieve/>
2674                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2675                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2676                         </actions>
2677                 </permacrud>
2678         </class>
2679         <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">
2680                 <fields oils_persist:primary="name">
2681                         <field name="name" reporter:datatype="text"/>
2682                         <field name="label" reporter:datatype="text"/>
2683                         <field name="description" reporter:datatype="text"/>
2684                         <field name="datatype" reporter:datatype="text"/>
2685                         <field name="view_perm" reporter:datatype="link"/>
2686                         <field name="update_perm" reporter:datatype="link"/>
2687                         <field name="fm_class" reporter:datatype="text"/>
2688                         <field name="grp" reporter:datatype="link"/>
2689                 </fields>
2690                 <links>
2691                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2692                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2693                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2694                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2695                 </links>
2696                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2697                         <actions>
2698                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2699                                 <retrieve/>
2700                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2701                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2702                         </actions>
2703                 </permacrud>
2704         </class>
2705         <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">
2706                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2707                         <field name="id" />
2708                         <field name="name"  reporter:datatype="text"/>
2709                         <field name="org_unit" reporter:datatype="org_unit"/>
2710                         <field name="value"  reporter:datatype="text"/>
2711                 </fields>
2712                 <links>
2713                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2714                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2715                 </links>
2716         </class>
2717         <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">
2718                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2719                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2720                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2721                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2722                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2723                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2724                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2725                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2726                 </fields>
2727                 <links>
2728                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2729                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2730                 </links>
2731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2732             <actions>
2733                 <create permission="CREATE_COPY_NOTE">
2734                     <context link="owning_copy" field="circ_lib"/>
2735                 </create>
2736                 <retrieve permission="VIEW_COPY_NOTES">
2737                     <context link="owning_copy" field="circ_lib"/>
2738                 </retrieve>
2739                 <update permission="UPDATE_COPY_NOTE">
2740                     <context link="owning_copy" field="circ_lib"/>
2741                 </update>
2742                 <delete permission="DELETE_COPY_NOTE">
2743                     <context link="owning_copy" field="circ_lib"/>
2744                 </delete>
2745             </actions>
2746         </permacrud>
2747         </class>
2748         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2749                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2750                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2751                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2752                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2753                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2754                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2755                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2756                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2757                 </fields>
2758                 <links>
2759                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2760                 </links>
2761         </class>
2762         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2763                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2764                         <field name="fingerprint"  reporter:datatype="text"/>
2765                         <field name="id" reporter:datatype="id" />
2766                         <field name="master_record" reporter:datatype="link"/>
2767                         <field name="mods"  reporter:datatype="text"/>
2768                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2769                 </fields>
2770                 <links>
2771                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2772                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2773                 </links>
2774         </class>
2775         <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">
2776                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2777                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2778                         <field name="name"  reporter:datatype="text"/>
2779                 </fields>
2780                 <links/>
2781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2782             <actions>
2783                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2784                 <retrieve/>
2785                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2786                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2787             </actions>
2788         </permacrud>
2789         </class>
2790         <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">
2791                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2792                         <field name="code"  reporter:datatype="text"/>
2793                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2794                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2795                 </fields>
2796                 <links/>
2797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2798             <actions>
2799                 <create permission="CREATE_PERM" global_required="true"/>
2800                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2801                 <update permission="UPDATE_PERM" global_required="true"/>
2802                 <delete permission="DELETE_PERM" global_required="true"/>
2803             </actions>
2804         </permacrud>
2805         </class>
2806         <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">
2807                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2808                         <field name="id" reporter:datatype="id" />
2809                         <field name="metarecord" reporter:datatype="link"/>
2810                         <field name="source" reporter:datatype="link"/>
2811                 </fields>
2812                 <links>
2813                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2814                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2815                 </links>
2816         </class>
2817         <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">
2818                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2819                         <field name="id" reporter:datatype="id" />
2820                         <field name="field" reporter:datatype="link"/>
2821                         <field name="source" reporter:datatype="link"/>
2822                         <field name="value"  reporter:datatype="text"/>
2823                 </fields>
2824                 <links>
2825                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2826                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2827                 </links>
2828         </class>
2829         <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">
2830                 <oils_persist:source_definition>
2831                         SELECT * FROM metabib.author_field_entry
2832                                                 UNION ALL
2833                         SELECT * FROM metabib.keyword_field_entry
2834                                                 UNION ALL
2835                         SELECT * FROM metabib.identifier_field_entry
2836                                                 UNION ALL
2837                         SELECT * FROM metabib.title_field_entry
2838                                                 UNION ALL
2839                         SELECT * FROM metabib.subject_field_entry
2840                                                 UNION ALL
2841                         SELECT * FROM metabib.series_field_entry
2842                 </oils_persist:source_definition>
2843                 <fields>
2844                         <field name="field" reporter:datatype="link"/>
2845                         <field name="id" reporter:datatype="id" />
2846                         <field name="source" reporter:datatype="link"/>
2847                         <field name="value"  reporter:datatype="text"/>
2848                 </fields>
2849                 <links>
2850                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2851                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2852                 </links>
2853         </class>
2854         <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">
2855                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2856                         <field name="field" reporter:datatype="link"/>
2857                         <field name="id" reporter:datatype="id" />
2858                         <field name="source" reporter:datatype="link"/>
2859                         <field name="value"  reporter:datatype="text"/>
2860                 </fields>
2861                 <links>
2862                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2863                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2864                 </links>
2865         </class>
2866         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2867                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2868                         <field name="accepting_usr" reporter:datatype="link"/>
2869                         <field name="amount" reporter:datatype="money" />
2870                         <field name="amount_collected" reporter:datatype="money" />
2871                         <field name="cash_drawer" reporter:datatype="link"/>
2872                         <field name="id" reporter:datatype="id" />
2873                         <field name="note"  reporter:datatype="text"/>
2874                         <field name="payment_ts" reporter:datatype="timestamp"/>
2875                         <field name="xact" reporter:datatype="link"/>
2876                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2877                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2878                 </fields>
2879                 <links>
2880                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2881                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2882                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2883                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2884                 </links>
2885         </class>
2886         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2887                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2888                         <field name="accepting_usr" reporter:datatype="link"/>
2889                         <field name="amount" reporter:datatype="money" />
2890                         <field name="amount_collected" reporter:datatype="money" />
2891                         <field name="id" reporter:datatype="id" />
2892                         <field name="note"  reporter:datatype="text"/>
2893                         <field name="payment_ts" reporter:datatype="timestamp"/>
2894                         <field name="xact" reporter:datatype="link"/>
2895                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2896                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2897                 </fields>
2898                 <links>
2899                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2900                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2901                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2902                 </links>
2903         </class>
2904         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2905                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2906                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2907                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2908                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2909                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2910                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2911                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2912                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2913                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2914                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2915                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2916                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2917                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2918                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2919                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2920                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2921                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2922                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2923                 </fields>
2924                 <links>
2925                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2926                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2927                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2928                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2929                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2930                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2931                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2932                 </links>
2933         </class>
2934
2935         <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">
2936                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2937                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2938                         <field name="name"  reporter:datatype="text"/>
2939                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2940                         <field name="block_list" reporter:datatype="text"/>
2941                         <field name="org_depth" reporter:datatype="int"/>
2942                 </fields>
2943                 <links/>
2944         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2945             <actions>
2946                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2947                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2948                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2949                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2950             </actions>
2951         </permacrud>
2952         </class>
2953         <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">
2954                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2955                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2956                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2957                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2958                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2959                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2960                 </fields>
2961                 <links>
2962                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2963                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2964                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2965         </links>
2966         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2967             <actions>
2968                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2969                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2970                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2971                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2972             </actions>
2973         </permacrud>
2974         </class>
2975         <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">
2976                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2977                         <field name="holdable" reporter:datatype="bool"/>
2978                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2979                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2980                         <field name="opac_visible" reporter:datatype="bool"/>
2981             <field name="copy_active" reporter:datatype="bool"/>
2982                 </fields>
2983                 <links/>
2984         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2985             <actions>
2986                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2987                 <retrieve/>
2988                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2989                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2990             </actions>
2991         </permacrud>
2992         </class>
2993         <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">
2994                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2995                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2996                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2997                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2998                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2999                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3000                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3001                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3002                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3003                 </fields>
3004                 <links>
3005                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3006                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3007                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3008                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3009                 </links>
3010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3011                         <actions>
3012                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3013                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3014                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3015                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3016                         </actions>
3017                 </permacrud>
3018         </class>
3019         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3020                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3021                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3022                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3023                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3024                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3025                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3026                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3027                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3028                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3029                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3030                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3031                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3032                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3033                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3034                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3035                 </fields>
3036                 <links>
3037                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3038                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3039                 </links>
3040         </class>
3041
3042         <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">
3043                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3044                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3045                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3046                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3047                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3048                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3049                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3050                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3051                 </fields>
3052                 <links>
3053                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3054                 </links>
3055         </class>
3056
3057         <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">
3058                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3059                         <field name="call_number" />
3060                         <field name="create_date" reporter:datatype="timestamp"/>
3061                         <field name="creator" reporter:datatype="link"/>
3062                         <field name="id" reporter:datatype="id" />
3063                         <field name="pub" reporter:datatype="bool"/>
3064                         <field name="title"  reporter:datatype="text"/>
3065                         <field name="value"  reporter:datatype="text"/>
3066                 </fields>
3067                 <links>
3068                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3069                 </links>
3070         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3071             <actions>
3072                 <create permission="CREATE_VOLUME_NOTE">
3073                     <context link="call_number" field="owning_lib"/>
3074                 </create>
3075                 <retrieve permission="VIEW_VOLUME_NOTES">
3076                     <context link="call_number" field="owning_lib"/>
3077                 </retrieve>
3078                 <update permission="UPDATE_VOLUME_NOTE">
3079                     <context link="call_number" field="owning_lib"/>
3080                 </update>
3081                 <delete permission="DELETE_VOLUME_NOTE">
3082                     <context link="call_number" field="owning_lib"/>
3083                 </delete>
3084             </actions>
3085         </permacrud>
3086         </class>
3087         <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">
3088                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3089                         <field name="create_date" reporter:datatype="timestamp"/>
3090                         <field name="creator" reporter:datatype="link"/>
3091                         <field name="edit_date" reporter:datatype="timestamp"/>
3092                         <field name="editor" reporter:datatype="link"/>
3093                         <field name="id" reporter:datatype="id" />
3094                         <field name="record" reporter:datatype="link"/>
3095                         <field name="value" reporter:datatype="text"/>
3096                 </fields>
3097                 <links>
3098                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3099                 </links>
3100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3101             <actions>
3102                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3103                 <retrieve/>
3104                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3105                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3106             </actions>
3107         </permacrud>
3108         </class>
3109         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3110         <oils_persist:source_definition>
3111 SELECT  usr,
3112         SUM(
3113             CASE
3114                 WHEN (
3115                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3116                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3117                 ) THEN 1
3118                 ELSE 0
3119             END
3120         ) AS out,
3121
3122         SUM(
3123             CASE
3124                 WHEN (
3125                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3126                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3127                 ) THEN 1
3128                 ELSE 0
3129             END
3130         ) AS overdue,
3131
3132         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3133         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3134         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3135   FROM  action.circulation
3136   WHERE checkin_time IS NULL
3137   GROUP BY 1
3138         </oils_persist:source_definition>
3139         <fields oils_persist:primary="usr">
3140             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3141             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3142             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3143             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3144             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3145             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3146         </fields>
3147         <links>
3148             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3149         </links>
3150         </class>
3151         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3152         <oils_persist:source_definition>
3153 SELECT  usr,
3154         ARRAY_TO_STRING(ARRAY_ACCUM(
3155             CASE
3156                 WHEN (
3157                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3158                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3159                 ) THEN id
3160                 ELSE 0
3161             END
3162         ),',') AS out,
3163
3164         ARRAY_TO_STRING(ARRAY_ACCUM(
3165             CASE
3166                 WHEN (
3167                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3168                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3169                 ) THEN id
3170                 ELSE 0
3171             END
3172         ),',') AS overdue,
3173
3174         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3175         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3176         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3177   FROM  action.circulation
3178   WHERE checkin_time IS NULL
3179   GROUP BY 1
3180         </oils_persist:source_definition>
3181         <fields oils_persist:primary="usr">
3182             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3183             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3184             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3185             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3186             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3187             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3188         </fields>
3189         <links>
3190             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3191         </links>
3192         </class>
3193         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3194                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3195                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3196                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3197                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3198                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3199                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3200                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3201                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3202                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3203                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3204                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3205                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3206                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3207                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3208                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3209                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3210                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3211                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3212                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3213                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3214                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3215                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3216                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3217                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3218                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3219                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3220                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3221                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3222                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3223                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3224                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3225                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3226                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3227                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3228                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3229                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3230                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3231                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3232                 </fields>
3233                 <links>
3234                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3235                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3236                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3237                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3238                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3239                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3240                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3241                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3242                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3243                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3244                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3245                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3246                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3247                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3248                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3249                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3250                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3251                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3252                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3253                 </links>
3254         </class>
3255         <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">
3256                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3257                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3258                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3259                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3260                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3261                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3262                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3263                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3264                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3265                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3266                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3267                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3268                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3269                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3270                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3271                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3272                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3273                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3274                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3275                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3276                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3277                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3278                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3279                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3280                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3281                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3282                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3283                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3284                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3285                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3286                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3287                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3288                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3289                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3290                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3291                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3292                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3293                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3294                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3295                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3296                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3297                 </fields>
3298                 <links>
3299                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3300                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3301                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3302                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3303                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3304                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3305                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3306                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3307                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3308                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3309                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3310                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3311                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3312                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3313                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3314                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3315                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3316                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3317                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3318                 </links>
3319         </class>
3320         <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">
3321                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3322                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3323                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3324                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3325                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3326                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3327                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3328                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3329                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3330                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3331                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3332                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3333                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3334                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3335                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3336                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3337                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3338                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3339                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3340                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3341                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3342                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3343                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3344                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3345                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3346                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3347                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3348                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3349                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3350                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3351                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3352                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3353                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3354                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3355                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3356                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3357                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3358                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3359                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3360                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3361                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3362                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3363                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3364                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3365                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3366                 </fields>
3367                 <links>
3368                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3369                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3370                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3371                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3372                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3373                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3374                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3375                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3376                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3377                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3378                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3379                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3380                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3381                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3382                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3383                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3384                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3385                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3386                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3387                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3388                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3389                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3390                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3391                 </links>
3392         </class>
3393
3394         <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">
3395                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3396                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3397                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3398                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3399                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3400                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3401                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3402                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3403                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3404                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3405                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3406                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3407                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3408                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3409                 </fields>
3410                 <links>
3411                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3412                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3413                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3414                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3415                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3416                 </links>
3417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3418                         <actions>
3419                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3420                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3421                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3422                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3423                         </actions>
3424                 </permacrud>
3425         </class>
3426
3427         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3428                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3429                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3430                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3431                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3432                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3433                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3434                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3435                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3436                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3437                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3438                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3439                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3440                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3441                 </fields>
3442                 <links>
3443                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3444                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3445                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3446                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3447                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3448                 </links>
3449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3450                         <actions>
3451                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3452                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3453                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3454                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3455                         </actions>
3456                 </permacrud>
3457         </class>
3458         
3459         <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">
3460                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3461                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3462                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3463                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3464                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3465                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3466                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3467                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3468                 </fields>
3469                 <links>
3470                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3471                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3472                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3473                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3474                 </links>
3475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3476                         <actions>
3477                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3478                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3479                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3480                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3481                         </actions>
3482                 </permacrud>
3483         </class>
3484         
3485         <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">
3486                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3487                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3488                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3489                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3490                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3491                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3492                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3493                 </fields>
3494                 <links>
3495                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3496                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3497                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3498                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3499                 </links>
3500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3501                         <actions>
3502                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3503                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3504                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3505                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3506                         </actions>
3507                 </permacrud>
3508         </class>
3509         
3510         <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">
3511                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3512                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3513                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3514                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3515                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3516                 </fields>
3517                 <links>
3518                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3519                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3520                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3521                 </links>
3522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3523                         <actions>
3524                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3525                     <context link="resource" field="owner" />
3526                 </create>
3527                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3528                     <context link="resource" field="owner" />
3529                 </retrieve>
3530                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3531                     <context link="resource" field="owner" />
3532                 </update>
3533                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3534                     <context link="resource" field="owner" />
3535                 </delete>
3536                         </actions>
3537                 </permacrud>
3538         </class>
3539         
3540         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3541                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3542                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3543                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3544                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3545                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3546                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3547                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3548                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3549                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3550                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3551                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3552                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3553                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3554                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3555                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3556                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3557                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3558                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3559                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3560                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3561                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3562                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3563                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3564                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3565                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3566                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3567                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3568                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3569                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3570                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3571                 </fields>
3572                 <links>
3573                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3574                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3575                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3576                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3577                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3578                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3579                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3580                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3581                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3582                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3583                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3584                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3585                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3586                 </links>
3587                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3588                         <actions>
3589                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3590                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3591                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3592                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3593                         </actions>
3594                 </permacrud>
3595         </class>
3596         
3597         <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">
3598                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3599                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3600                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3601                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3602                 </fields>
3603                 <links>
3604                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3605                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3606                 </links>
3607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3608                         <actions>
3609                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3610                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3611                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3612                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3613                         </actions>
3614                 </permacrud>
3615         </class>
3616
3617         <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">
3618                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3619                         <field name="bucket" reporter:datatype="link"/>
3620                         <field name="id" reporter:datatype="id" />
3621                         <field name="target_call_number" reporter:datatype="link" />
3622                         <field name="create_time" reporter:datatype="timestamp" />
3623                         <field name="pos" reporter:datatype="int" />
3624                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3625                 </fields>
3626                 <links>
3627                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3628                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3629             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3630                 </links>
3631         </class>
3632         <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">
3633                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3634                         <field name="id" reporter:datatype="id" />
3635                         <field name="item" reporter:datatype="link"/>
3636                         <field name="note" reporter:datatype="text" />
3637                 </fields>
3638                 <links>
3639                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3640                 </links>
3641         </class>
3642         <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">
3643                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3644                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3645                         <field name="btype" reporter:datatype="text"/>
3646                         <field name="id" reporter:datatype="id" />
3647                         <field name="name" reporter:datatype="text"/>
3648                         <field name="owner" reporter:datatype="link"/>
3649                         <field name="pub" reporter:datatype="bool"/>
3650                         <field name="create_time" reporter:datatype="timestamp" />
3651                 </fields>
3652                 <links>
3653                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3654                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3655                 </links>
3656         </class>
3657         <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">
3658                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3659                         <field name="id" reporter:datatype="id" />
3660                         <field name="bucket" reporter:datatype="link"/>
3661                         <field name="note" reporter:datatype="text" />
3662                 </fields>
3663                 <links>
3664                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3665                 </links>
3666         </class>
3667         <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">
3668                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3669                         <field name="hold" reporter:datatype="link"/>
3670                         <field name="id" reporter:datatype="id" />
3671                         <field name="target_copy" reporter:datatype="link"/>
3672                 </fields>
3673                 <links>
3674                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3675                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3676                 </links>
3677         </class>
3678         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3679                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3680                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3681                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3682                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3683                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3684                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3685                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3686                 </fields>
3687                 <links>
3688                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3689                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3690                 </links>
3691         </class>
3692         <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">
3693                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3694                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3695                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3696                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3697                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3698                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3699                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3700                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3701                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3702                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3703                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3704                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3705                 </fields>
3706                 <links>
3707                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3708                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3709                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3710                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3711                 </links>
3712         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3713             <actions>
3714                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3715                 <retrieve/>
3716                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3717                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3718             </actions>
3719         </permacrud>
3720         </class>
3721
3722     <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">
3723         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3724             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3725             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3726             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3727             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3728         </fields>
3729         <links>
3730             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3731             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3732         </links>
3733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3734             <actions>
3735                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3736                 <retrieve/>
3737                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3738                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3739             </actions>
3740         </permacrud>
3741     </class>
3742
3743         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3744                 <fields>
3745                         <field name="sre_id" oils_persist:virtual="true" />
3746                         <field name="location" oils_persist:virtual="true" />
3747                         <field name="owning_lib" oils_persist:virtual="true" />
3748                         <field name="basic_holdings" oils_persist:virtual="true" />
3749                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3750                         <field name="supplement_holdings" oils_persist:virtual="true" />
3751                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3752                         <field name="index_holdings" oils_persist:virtual="true" />
3753                         <field name="index_holdings_add" oils_persist:virtual="true" />
3754                         <field name="online" oils_persist:virtual="true" />
3755                         <field name="missing" oils_persist:virtual="true" />
3756                         <field name="incomplete" oils_persist:virtual="true" />
3757                 </fields>
3758         </class>
3759
3760         <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">
3761                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3762                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3763                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3764                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3765                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3766                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3767                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3768                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3769                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3770                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3771                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3772                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3773                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3774                 </fields>
3775                 <links>
3776                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3777                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3778                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3779                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3780                 </links>
3781                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3782                         <actions>
3783                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3784                                 <retrieve/>
3785                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3786                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3787                         </actions>
3788                 </permacrud>
3789         </class>
3790
3791         <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">
3792                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3793                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3794                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3795                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3796                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3797                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3798                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3799                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3800                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3801                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3802                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3803                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3804                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3805                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3806                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3807                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3808                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3809                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3810                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3811                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3812                 </fields>
3813                 <links>
3814                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3815                 </links>
3816                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3817                         <actions>
3818                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3819                                         <context link="subscription" field="owning_lib" />
3820                                 </create>
3821                                 <retrieve />
3822                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3823                                         <context link="subscription" field="owning_lib" />
3824                                 </update>
3825                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3826                                         <context link="subscription" field="owning_lib" />
3827                                 </delete>
3828                         </actions>
3829                 </permacrud>
3830         </class>
3831
3832         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3833                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3834                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3835                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3836                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3837                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3838                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3839                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3840                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3841                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3842                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3843                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3844                 </fields>
3845                 <links>
3846                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3847                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3848                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3849                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3850                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3851                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3852                 </links>
3853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3854                         <actions>
3855                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3856                                 <retrieve />
3857                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3858                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3859                         </actions>
3860                 </permacrud>
3861         </class>
3862
3863         <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">
3864                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3865                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3866                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3867                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3868                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3869                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3870                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3871                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3872                 </fields>
3873                 <links>
3874                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3875                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3876                 </links>
3877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3878                 </permacrud>
3879         </class>
3880
3881         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3882                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3883                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3884                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3885                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3886                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3887                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3888                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3889                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3890                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3891                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3892                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3893                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3894                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3895                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3896                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3897                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3898                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3899                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3900                 </fields>
3901                 <links>
3902                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3903                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3904                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3905                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3906                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3907                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3908                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3909                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3910                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3911                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3912                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3913                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3914                 </links>
3915                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3916                         <actions>
3917                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3918                                 <retrieve />
3919                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3920                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3921                         </actions>
3922                 </permacrud>
3923         </class>
3924
3925         <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">
3926                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3927                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3928                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3929                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3930                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3931                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3932                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3933                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3934                 </fields>
3935                 <links>
3936                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3937                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3938                 </links>
3939                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3940                         <actions>
3941                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3942                                         <context link="distribution" field="holding_lib" />
3943                                 </create>
3944                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3945                                         <context link="distribution" field="holding_lib" />
3946                                 </retrieve>
3947                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3948                                         <context link="distribution" field="holding_lib" />
3949                                 </update>
3950                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3951                                         <context link="distribution" field="holding_lib" />
3952                                 </delete>
3953                         </actions>
3954                 </permacrud>
3955         </class>
3956
3957         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3958                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3959                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3960                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3961                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3962                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3963                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3964                 </fields>
3965                 <links>
3966                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3967                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3968                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3969                 </links>
3970                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3971                         <actions>
3972                                 <create permission="ADMIN_SERIAL_STREAM">
3973                                         <context link="distribution" field="holding_lib" />
3974                                 </create>
3975                                 <retrieve />
3976                                 <update permission="ADMIN_SERIAL_STREAM">
3977                                         <context link="distribution" field="holding_lib" />
3978                                 </update>
3979                                 <delete permission="ADMIN_SERIAL_STREAM">
3980                                         <context link="distribution" field="holding_lib" />
3981                                 </delete>
3982                         </actions>
3983                 </permacrud>
3984         </class>
3985
3986         <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">
3987                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3988                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3989                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3990                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3991                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3992                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3993                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3994                 </fields>
3995                 <links>
3996                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3997                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3998                 </links>
3999                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4000                         <actions>
4001                                 <create permission="ADMIN_SERIAL_STREAM">
4002                                         <context link="stream" jump="distribution" field="holding_lib" />
4003                                 </create>
4004                                 <retrieve permission="RECEIVE_SERIAL">
4005                                         <context link="stream" jump="distribution" field="holding_lib" />
4006                                 </retrieve>
4007                                 <update permission="ADMIN_SERIAL_STREAM">
4008                                         <context link="stream" jump="distribution" field="holding_lib" />
4009                                 </update>
4010                                 <delete permission="ADMIN_SERIAL_STREAM">
4011                                         <context link="stream" jump="distribution" field="holding_lib" />
4012                                 </delete>
4013                         </actions>
4014                 </permacrud>
4015         </class>
4016
4017         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4018                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4019                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4020                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4021                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4022                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4023                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4024                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4025                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4026                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4027                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4028                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4029                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4030                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4031                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4032                 </fields>
4033                 <links>
4034                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4035                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4036                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4037                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4038                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4039                 </links>
4040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4041                         <actions>
4042                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4043                                         <context link="subscription" field="owning_lib" />
4044                                 </create>
4045                                 <retrieve/>
4046                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4047                                         <context link="subscription" field="owning_lib" />
4048                                 </update>
4049                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4050                                         <context link="subscription" field="owning_lib" />
4051                                 </delete>
4052                         </actions>
4053                 </permacrud>
4054         </class>
4055
4056         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4057                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4058                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4059                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4060                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4061                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4062                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4063                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4064                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4065                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4066                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4067                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4068                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4069                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4070                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4071                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4072                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4073                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4074                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4075                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4076                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4077                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4078                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4079                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4080                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4081                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4082                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4083                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4084                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4085                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4086                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4087                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4088                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4089                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4090                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4091                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4092                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4093                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4094                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4095                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4096                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4097                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4098                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4099                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4100                 </fields>
4101                 <links>
4102                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4103                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4104                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4105                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4106                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4107                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4108                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4109                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4110                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4111                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4112                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4113                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4114                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4115                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4116                 </links>
4117                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4118                         <actions>
4119                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4120                                 <retrieve/>
4121                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4122                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4123                         </actions>
4124                 </permacrud>
4125         </class>
4126
4127         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4128                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4129                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4130                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4131                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4132                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4133                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4134                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4135                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4136                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4137                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4138                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4139                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4140                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4141                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4142                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4143                 </fields>
4144                 <links>
4145                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4146                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4147                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4148                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4149                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4150                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4151                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4152                 </links>
4153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4154                         <actions>
4155                                 <create permission="ADMIN_SERIAL_ITEM">
4156                                         <context link="stream" jump="distribution" field="holding_lib" />
4157                                 </create>
4158                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4159                                         <context link="stream" jump="distribution" field="holding_lib" />
4160                                 </retrieve>
4161                                 <update permission="ADMIN_SERIAL_ITEM">
4162                                         <context link="stream" jump="distribution" field="holding_lib" />
4163                                 </update>
4164                                 <delete permission="ADMIN_SERIAL_ITEM">
4165                                         <context link="stream" jump="distribution" field="holding_lib" />
4166                                 </delete>
4167                         </actions>
4168                 </permacrud>
4169         </class>
4170
4171         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4172                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4173                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4174                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4175                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4176                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4177                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4178                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4179                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4180                 </fields>
4181                 <links>
4182                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4183                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4184                 </links>
4185                 <!-- Not available via PCRUD at this time -->
4186         </class>
4187
4188         <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">
4189                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4190                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4191                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4192                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4193                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4194                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4195                 </fields>
4196                 <links>
4197                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4198                 </links>
4199                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4200                         <actions>
4201                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4202                                         <context link="distribution" field="holding_lib" />
4203                                 </create>
4204                                 <retrieve/>
4205                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4206                                         <context link="distribution" field="holding_lib" />
4207                                 </update>
4208                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4209                                         <context link="distribution" field="holding_lib" />
4210                                 </create>
4211                         </actions>
4212                 </permacrud>
4213         </class>
4214
4215         <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">
4216                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4217                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4218                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4219                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4220                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4221                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4222                 </fields>
4223                 <links>
4224                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4225                 </links>
4226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4227                         <actions>
4228                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4229                                         <context link="distribution" field="holding_lib" />
4230                                 </create>
4231                                 <retrieve/>
4232                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4233                                         <context link="distribution" field="holding_lib" />
4234                                 </update>
4235                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4236                                         <context link="distribution" field="holding_lib" />
4237                                 </create>
4238                         </actions>
4239                 </permacrud>
4240         </class>
4241
4242         <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">
4243                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4244                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4245                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4246                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4247                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4248                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4249                 </fields>
4250                 <links>
4251                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4252                 </links>
4253                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4254                         <actions>
4255                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4256                                         <context link="distribution" field="holding_lib" />
4257                                 </create>
4258                                 <retrieve/>
4259                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4260                                         <context link="distribution" field="holding_lib" />
4261                                 </update>
4262                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4263                                         <context link="distribution" field="holding_lib" />
4264                                 </create>
4265                         </actions>
4266                 </permacrud>
4267         </class>
4268
4269         <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">
4270                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4271                         <field name="id" reporter:datatype="id" />
4272                         <field name="owning_copy" reporter:datatype="link"/>
4273                         <field name="stat_cat" reporter:datatype="link"/>
4274                         <field name="stat_cat_entry" reporter:datatype="link"/>
4275                 </fields>
4276                 <links>
4277                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4278                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4279                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4280                 </links>
4281         </class>
4282         <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">
4283                 <fields oils_persist:primary="code">
4284                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4285                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4286                 </fields>
4287                 <links/>
4288         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4289             <actions>
4290                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4291                 <retrieve/>
4292                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4293                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4294             </actions>
4295         </permacrud>
4296         </class>
4297         <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">
4298                 <fields oils_persist:primary="code">
4299                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4300                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4301                 </fields>
4302                 <links/>
4303         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4304             <actions>
4305                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4306                 <retrieve/>
4307                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4308                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4309             </actions>
4310         </permacrud>
4311         </class>
4312         <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">
4313                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4314                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4315                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4316                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4317                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4318                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4319                 </fields>
4320                 <links>
4321             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4322         </links>
4323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4324             <actions>
4325                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4326                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4327                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4328                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4329             </actions>
4330         </permacrud>
4331         </class>
4332         <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">
4333                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4334                         <field name="id" reporter:datatype="id" />
4335                         <field name="name" reporter:datatype="text"/>
4336                 </fields>
4337                 <links/>
4338         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4339             <actions>
4340                 <create permission="CREATE_LASSO" global_required="true"/>
4341                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4342                 <update permission="UPDATE_LASSO" global_required="true"/>
4343                 <delete permission="DELETE_LASSO" global_required="true"/>
4344             </actions>
4345         </permacrud>
4346         </class>
4347         <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">
4348                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4349                         <field name="id" reporter:datatype="id" />
4350                         <field name="lasso" reporter:datatype="link"/>
4351                         <field name="org_unit" reporter:datatype="org_unit"/>
4352                 </fields>
4353                 <links>
4354                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4355                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4356                 </links>
4357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4358             <actions>
4359                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4360                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4361                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4362                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4363             </actions>
4364         </permacrud>
4365         </class>
4366         <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">
4367                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4368                         <field name="id" reporter:datatype="id" />
4369                         <field name="from_org" reporter:datatype="org_unit"/>
4370                         <field name="to_org" reporter:datatype="org_unit"/>
4371                         <field name="prox" reporter:datatype="int" />
4372                 </fields>
4373                 <links>
4374                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4375                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4376                 </links>
4377         </class>
4378         <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">
4379                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4380                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4381                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4382                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4383                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4384                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4385                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4386                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4387                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4388                 </fields>
4389                 <links/>
4390         </class>
4391         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4392                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4393                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4394                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4395                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4396                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4397                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4398                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4399                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4400                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4401                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4402                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4403                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4404                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4405                 </fields>
4406                 <links>
4407                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4408                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4409                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4410                 </links>
4411         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4412             <actions>
4413                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4414                 <retrieve/>
4415                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4416                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4417             </actions>
4418         </permacrud>
4419         </class>
4420         <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">
4421                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4422                         <field name="address_type"  reporter:datatype="text"/>
4423                         <field name="city"  reporter:datatype="text"/>
4424                         <field name="country"  reporter:datatype="text"/>
4425                         <field name="county"  reporter:datatype="text"/>
4426                         <field name="id" reporter:datatype="id" />
4427                         <field name="org_unit" reporter:datatype="org_unit"/>
4428                         <field name="post_code"  reporter:datatype="text"/>
4429                         <field name="state"  reporter:datatype="text"/>
4430                         <field name="street1"  reporter:datatype="text"/>
4431                         <field name="street2"  reporter:datatype="text"/>
4432                         <field name="valid" reporter:datatype="bool"/>
4433                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4434                 </fields>
4435                 <links>
4436                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4437                 </links>
4438         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4439             <actions>
4440                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4441                 <retrieve/>
4442                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4443                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4444             </actions>
4445         </permacrud>
4446         </class>
4447         <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">
4448                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4449                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4450                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4451                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4452                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4453                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4454                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4455                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4456                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4457                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4458                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4459                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4460                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4461                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4462                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4463                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4464                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4465                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4466                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4467                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4468                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4469                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4470                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4471                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4472                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4473                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4474                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4475                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4476                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4477                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4478                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4479                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4480                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4481                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4482                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4483                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4484                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4485                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4486                 </fields>
4487                 <links>
4488                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4489                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4490                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4491                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4492                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4493                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4494                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4495                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4496                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4497                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4498                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4499                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4500                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4501                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4502                 </links>
4503         </class>
4504         <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">
4505                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4506                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4507                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4508                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4509                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4510                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4511                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4512                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4513                 </fields>
4514                 <links>
4515                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4516                 </links>
4517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4518                         <actions>
4519                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4520                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4521                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4522                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4523                         </actions>
4524                 </permacrud>
4525         </class>
4526         <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">
4527                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4528                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4529                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4530                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4531                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4532                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4533                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4534                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4535                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4536                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4537                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4538                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4539                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4540                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4541                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4542                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4543                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4544                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4545                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4546                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4547                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4548                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4549                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4550                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4551                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4552                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4553                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4554                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4555                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4556                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4557                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4558                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4559                 </fields>
4560                 <links>
4561                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4562                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4563                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4564                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4565                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4566                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4567                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4568                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4569                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4570                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4571                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4572                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4573                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4574                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4575                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4576                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4577                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4578                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4579                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4580                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4581                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4582                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4583                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4584                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4585                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4586                 </links>
4587         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4588             <actions>
4589                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4590                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4591                     <context field="id"/>
4592                     <context field="parent_ou"/>
4593                                 </retrieve>
4594                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4595                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4596             </actions>
4597         </permacrud>
4598         </class>
4599         <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">
4600                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4601                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4602                         <field name="btype" reporter:datatype="text"/>
4603                         <field name="id" reporter:datatype="id" />
4604                         <field name="name"  reporter:datatype="text"/>
4605                         <field name="owner" reporter:datatype="link"/>
4606                         <field name="pub" reporter:datatype="bool"/>
4607                         <field name="create_time" reporter:datatype="timestamp" />
4608                 </fields>
4609                 <links>
4610                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4611                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4612                 </links>
4613         </class>
4614         <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">
4615                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4616                         <field name="id" reporter:datatype="id" />
4617                         <field name="bucket" reporter:datatype="link"/>
4618                         <field name="note" reporter:datatype="text" />
4619                 </fields>
4620                 <links>
4621                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4622                 </links>
4623         </class>
4624         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4625                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4626                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4627                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4628                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4629                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4630                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4631                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4632                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4633                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4634                 </fields>
4635                 <links>
4636                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4637                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4638                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4639                 </links>
4640         </class>
4641         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4642                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4643                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4644                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4645                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4646                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4647                 </fields>
4648                 <links>
4649                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4650                 </links>
4651         </class>
4652     <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">
4653         <fields oils_persist:primary="field">
4654             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4655             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4656             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4657         </fields>
4658         <links/>
4659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4660             <actions>
4661                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4662                 <retrieve />
4663                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4664                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4665             </actions>
4666         </permacrud>
4667     </class>
4668         <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">
4669                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4670                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4671                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4672                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4673                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4674                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4675                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4676                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4677                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4678                 </fields>
4679                 <links>
4680                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4681                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4682                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4683                 </links>
4684         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4685             <actions>
4686                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4687                 <retrieve />
4688                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4689                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4690             </actions>
4691         </permacrud>
4692         </class>
4693         <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">
4694                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4695                         <field name="field" reporter:datatype="link"/>
4696                         <field name="id" reporter:datatype="id" />
4697                         <field name="source" reporter:datatype="link"/>
4698                         <field name="value"  reporter:datatype="text"/>
4699                 </fields>
4700                 <links>
4701                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4702                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4703                 </links>
4704         </class>
4705         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4706                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4707                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4708                         <field name="btype" reporter:datatype="text"/>
4709                         <field name="id" reporter:datatype="id" />
4710                         <field name="name"  reporter:datatype="text"/>
4711                         <field name="owner" reporter:datatype="link"/>
4712                         <field name="pub" reporter:datatype="bool"/>
4713                         <field name="create_time" reporter:datatype="timestamp" />
4714                 </fields>
4715                 <links>
4716                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4717                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4718                 </links>
4719         </class>
4720         <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">
4721                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4722                         <field name="id" reporter:datatype="id" />
4723                         <field name="bucket" reporter:datatype="link"/>
4724                         <field name="note" reporter:datatype="text" />
4725                 </fields>
4726                 <links>
4727                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4728                 </links>
4729         </class>
4730         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4731                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4732                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4733                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4734                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4735                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4736                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4737                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4738                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4739                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4740                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4741                 </fields>
4742                 <links>
4743                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4744                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4745                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4746                 </links>
4747         </class>
4748         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4749                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4750                         <field name="id" reporter:datatype="id" />
4751                         <field name="ind1" />
4752                         <field name="ind2" />
4753                         <field name="record" />
4754                         <field name="subfield" />
4755                         <field name="tag" />
4756                         <field name="value" />
4757                 </fields>
4758                 <links>
4759                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4760                 </links>
4761         </class>
4762         <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">
4763                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4764                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4765                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4766                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4767                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4768                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4769                 </fields>
4770                 <links>
4771                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4772                 </links>
4773         </class>
4774         <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">
4775                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4776                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4777                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4778                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4779                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4780                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4781                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4782                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4783                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4784                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4785                 </fields>
4786                 <links>
4787                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4788                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4789                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4790                 </links>
4791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4792             <actions>
4793                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4794                 <retrieve/>
4795                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4796                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4797             </actions>
4798         </permacrud>
4799         </class>
4800         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4801                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4802                         <field name="create_date" reporter:datatype="timestamp"/>
4803                         <field name="creator" reporter:datatype="link"/>
4804                         <field name="edit_date" reporter:datatype="timestamp"/>
4805                         <field name="editor" reporter:datatype="link"/>
4806                         <field name="id" reporter:datatype="id" />
4807                         <field name="pub" reporter:datatype="bool"/>
4808                         <field name="record" reporter:datatype="link"/>
4809                         <field name="value"  reporter:datatype="text"/>
4810                 </fields>
4811                 <links>
4812                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4813                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4814                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4815                 </links>
4816         </class>
4817         <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">
4818                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4819                         <field name="balance_owed" reporter:datatype="money" />
4820                         <field name="total_owed" reporter:datatype="money" />
4821                         <field name="total_paid" reporter:datatype="money" />
4822                         <field name="usr" reporter:datatype="link"/>
4823                 </fields>
4824                 <links>
4825                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4826                 </links>
4827         </class>
4828         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4829                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4830                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4831                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4832                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4833                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4834                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4835                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4836                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4837                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4838                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4839                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4840                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4841                 </fields>
4842                 <links>
4843                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4844                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4845                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4846                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4847                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4848                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4849                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4850                 </links>
4851         </class>
4852         <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">
4853                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4854                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4855                         <field name="quality" reporter:datatype="int" />
4856                         <field name="source" reporter:datatype="text"/>
4857                         <field name="transcendant" reporter:datatype="bool"/>
4858                 </fields>
4859                 <links/>
4860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4861             <actions>
4862                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4863                 <retrieve/>
4864                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4865                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4866             </actions>
4867         </permacrud>
4868         </class>
4869         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4870                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4871                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4872                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4873                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4874                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4875                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4876                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4877                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4878                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4879                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4880                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4881                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4882                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4883                 </fields>
4884                 <links>
4885                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4886                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4887                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4888                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4889                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4890                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4891                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4892                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4893                 </links>
4894         </class>
4895         <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">
4896                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4897                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4898                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4899                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4900                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4901                 </fields>
4902                 <links>
4903                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4904                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4905                 </links>
4906         </class>
4907         <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">
4908                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4909                         <field name="bucket" reporter:datatype="link"/>
4910                         <field name="id" reporter:datatype="id" />
4911                         <field name="target_user" reporter:datatype="link"/>
4912                         <field name="create_time" reporter:datatype="timestamp" />
4913                         <field name="pos" reporter:datatype="int" />
4914                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4915                 </fields>
4916                 <links>
4917                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4918                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4919             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4920                 </links>
4921         </class>
4922         <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">
4923                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4924                         <field name="id" reporter:datatype="id" />
4925                         <field name="item" reporter:datatype="link"/>
4926                         <field name="note" reporter:datatype="text" />
4927                 </fields>
4928                 <links>
4929                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4930                 </links>
4931         </class>
4932         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4933                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4934                         <field name="balance_owed" reporter:datatype="money" />
4935                         <field name="total_owed" reporter:datatype="money" />
4936                         <field name="total_paid" reporter:datatype="money" />
4937                         <field name="usr" reporter:datatype="link"/>
4938                 </fields>
4939                 <links>
4940                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4941                 </links>
4942         </class>
4943         <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">
4944                 <fields oils_persist:primary="code" oils_persist:sequence="">
4945                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4946                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4947                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4948                 </fields>
4949                 <links/>
4950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4951             <actions>
4952                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4953                 <retrieve/>
4954                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4955                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4956             </actions>
4957         </permacrud>
4958         </class>
4959         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4960                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4961                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4962                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4963                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4964                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4965                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4966                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4967                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4968                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4969                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4970                 </fields>
4971                 <links>
4972                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4973                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4974                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4975                 </links>
4976         </class>
4977         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4978                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4979                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4980                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4981                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4982                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4983                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4984                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4985                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4986                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4987                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4988                 </fields>
4989                 <links>
4990                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4991                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4992                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4993                 </links>
4994         </class>
4995         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4996                 <fields oils_persist:primary="id" oils_persist:sequence="">
4997                         <field name="checkin_lib" reporter:datatype="link"/>
4998                         <field name="checkin_staff" reporter:datatype="link"/>
4999                         <field name="checkin_time" reporter:datatype="timestamp"/>
5000                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5001                         <field name="circ_staff" reporter:datatype="link"/>
5002                         <field name="desk_renewal" reporter:datatype="bool"/>
5003                         <field name="due_date" reporter:datatype="timestamp"/>
5004                         <field name="duration" reporter:datatype="interval"/>
5005                         <field name="duration_rule" reporter:datatype="link"/>
5006                         <field name="fine_interval" reporter:datatype="interval"/>
5007                         <field name="id" reporter:datatype="id" />
5008                         <field name="max_fine" reporter:datatype="money" />
5009                         <field name="max_fine_rule" reporter:datatype="link"/>
5010                         <field name="opac_renewal" reporter:datatype="bool"/>
5011                         <field name="phone_renewal" reporter:datatype="bool"/>
5012                         <field name="recurring_fine" reporter:datatype="money" />
5013                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5014                         <field name="renewal_remaining" reporter:datatype="int" />
5015             <field name="grace_period" reporter:datatype="interval" />
5016                         <field name="stop_fines" reporter:datatype="text"/>
5017                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5018                         <field name="target_copy" reporter:datatype="link"/>
5019                         <field name="usr" reporter:datatype="link"/>
5020                         <field name="xact_finish" reporter:datatype="timestamp" />
5021                         <field name="xact_start" reporter:datatype="timestamp" />
5022                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5023                 </fields>
5024                 <links>
5025                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5026                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5027                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5028                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5029                 </links>
5030         </class>
5031         <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">
5032                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5033                         <field name="field" reporter:datatype="link"/>
5034                         <field name="id" reporter:datatype="id" />
5035                         <field name="source" reporter:datatype="link"/>
5036                         <field name="value" reporter:datatype="text"/>
5037                 </fields>
5038                 <links>
5039                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5040                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5041                 </links>
5042         </class>
5043         <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">
5044                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5045                         <field name="high" reporter:datatype="money" />
5046                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5047                         <field name="low" reporter:datatype="money" />
5048                         <field name="name" reporter:datatype="text"/>
5049                         <field name="normal" reporter:datatype="money" />
5050                         <field name="recurrence_interval" reporter:datatype="interval"/>
5051             <field name="grace_period" reporter:datatype="interval" />
5052                 </fields>
5053                 <links/>
5054         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5055             <actions>
5056                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5057                 <retrieve/>
5058                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5059                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5060             </actions>
5061         </permacrud>
5062         </class>
5063         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5064                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5065                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5066                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5067                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5068                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5069                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5070                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5071                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5072                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5073                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5074                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5075                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5076                 </fields>
5077                 <links>
5078                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5079                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5080                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5081                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5082                 </links>
5083         </class>
5084         <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">
5085                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5086                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5087                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5088                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5089                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5090                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5091                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5092                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5093                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5094                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5095                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5096                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5097                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5098                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5099                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5100                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5101                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5102                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5103                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5104                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5105                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5106                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5107                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5108                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5109                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5110                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5111                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5112                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5113                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5114                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5115                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5116                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5117                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5118                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5119                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5120                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5121                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5122                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5123                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5124                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5125                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5126                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5127                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5128                 </fields>
5129                 <links>
5130                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5131                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5132                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5133                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5134                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5135                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5136                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5137                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5138                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5139                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5140                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5141                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5142                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5143                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5144                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5145                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5146                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5147                 </links>
5148         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5149             <actions>
5150                 <create permission="CREATE_COPY">
5151                     <context link="call_number" field="owning_lib"/>
5152                 </create>
5153                 <retrieve/>
5154                 <update permission="UPDATE_COPY">
5155                     <context link="call_number" field="owning_lib"/>
5156                 </update>
5157                 <delete permission="DELETE_COPY">
5158                     <context link="call_number" field="owning_lib"/>
5159                 </delete>
5160             </actions>
5161         </permacrud>
5162         </class>
5163
5164         <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">
5165                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5166                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5167                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5168                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5169                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5170                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5171                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5172                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5173                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5174                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
5175                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5176                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5177                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5178                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5179                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5180                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5181                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5182                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5183                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5184                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5185                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5186                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5187                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5188                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5189                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5190                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5191                 </fields>
5192                 <links>
5193                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5194                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5195                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5196                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5197                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5198                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5199                 </links>
5200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5201                         <actions>
5202                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5203                                 <retrieve />
5204                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5205                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5206                         </actions>
5207                 </permacrud>
5208         </class>
5209
5210         <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">
5211                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5212                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5213                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5214                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5215                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5216                 </fields>
5217                 <links/>
5218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5219             <actions>
5220                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5221                 <retrieve/>
5222                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5223                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5224             </actions>
5225         </permacrud>
5226         </class>
5227         <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">
5228                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5229                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5230                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5231                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5232                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5233                 </fields>
5234                 <links/>
5235         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5236             <actions>
5237                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5238                 <retrieve/>
5239                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5240                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5241             </actions>
5242         </permacrud>
5243         </class>
5244         <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">
5245                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5246                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5247                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5248                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5249                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5250                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5251                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5252                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5253                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5254                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5255                 </fields>
5256                 <links>
5257                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5258                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5259                 </links>
5260         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5261             <actions>
5262                 <create permission="CREATE_PERM" global_required="true"/>
5263                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5264                 <update permission="UPDATE_PERM" global_required="true"/>
5265                 <delete permission="DELETE_PERM" global_required="true"/>
5266             </actions>
5267         </permacrud>
5268         </class>
5269         <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">
5270                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5271                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5272                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5273                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5274                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5275                 </fields>
5276                 <links>
5277                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5278                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5279                 </links>
5280         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5281             <actions>
5282                 <create permission="ADMIN_SURVEY">
5283                     <context link="question" jump="survey" field="owner"/>
5284                 </create>
5285                 <retrieve/>
5286                 <update permission="ADMIN_SURVEY">
5287                     <context link="question" jump="survey" field="owner"/>
5288                 </update>
5289                 <delete permission="ADMIN_SURVEY">
5290                     <context link="question" jump="survey" field="owner"/>
5291                 </delete>
5292             </actions>
5293         </permacrud>
5294         </class>
5295         <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">
5296                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5297                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5298                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5299                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5300                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5301                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5302                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5303                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5304                 </fields>
5305                 <links>
5306                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5307                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5308                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5309                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5310                 </links>
5311         </class>
5312         <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">
5313                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5314                         <field name="balance_owed" reporter:datatype="money" />
5315                         <field name="total_owed" reporter:datatype="money" />
5316                         <field name="total_paid" reporter:datatype="money" />
5317                         <field name="usr" reporter:datatype="link"/>
5318                 </fields>
5319                 <links>
5320                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5321                 </links>
5322         </class>
5323         <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">
5324                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5325                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5326                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5327                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5328                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5329                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5330                 </fields>
5331                 <links>
5332                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5333                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5334                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5335                 </links>
5336         </class>
5337         <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">
5338                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5339                         <field name="field" reporter:datatype="link"/>
5340                         <field name="id" reporter:datatype="id" />
5341                         <field name="source" reporter:datatype="link"/>
5342                         <field name="value" reporter:datatype="text"/>
5343                 </fields>
5344                 <links>
5345                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5346                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5347                 </links>
5348         </class>
5349         <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">
5350                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5351                         <field name="field" reporter:datatype="link"/>
5352                         <field name="id" reporter:datatype="id" />
5353                         <field name="source" reporter:datatype="link"/>
5354                         <field name="value" reporter:datatype="text"/>
5355                 </fields>
5356                 <links>
5357                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5358                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5359                 </links>
5360         </class>
5361         <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">
5362                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5363                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5364                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5365                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5366                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5367                 </fields>
5368                 <links>
5369                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5370                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5371                 </links>
5372         </class>
5373         <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">
5374                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5375                         <field name="depth" reporter:datatype="int" />
5376                         <field name="grantable" reporter:datatype="bool"/>
5377                         <field name="grp" reporter:datatype="link"/>
5378                         <field name="id" reporter:datatype="id" />
5379                         <field name="perm" reporter:datatype="link"/>
5380                 </fields>
5381                 <links>
5382                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5383                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5384                 </links>
5385         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5386             <actions>
5387                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5388                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5389                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5390                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5391             </actions>
5392         </permacrud>
5393         </class>
5394         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5395                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5396                         <field name="items" oils_persist:virtual="true" />
5397                         <field name="btype" reporter:datatype="text"/>
5398                         <field name="id" reporter:datatype="id" />
5399                         <field name="name" reporter:datatype="text"/>
5400                         <field name="owner" reporter:datatype="link"/>
5401                         <field name="pub" reporter:datatype="bool"/>
5402                         <field name="create_time" reporter:datatype="timestamp" />
5403                 </fields>
5404                 <links>
5405                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5406                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5407                 </links>
5408         </class>
5409         <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">
5410                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5411                         <field name="id" reporter:datatype="id" />
5412                         <field name="bucket" reporter:datatype="link"/>
5413                         <field name="note" reporter:datatype="text" />
5414                 </fields>
5415                 <links>
5416                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5417                 </links>
5418         </class>
5419         <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">
5420                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5421                         <field name="id" reporter:datatype="int" />
5422                         <field name="usr" reporter:datatype="link"/>
5423                         <field name="work_ou" reporter:datatype="link"/>
5424                 </fields>
5425                 <links>
5426                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5427                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5428                 </links>
5429         </class>
5430         <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">
5431                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5432                         <field name="depth" reporter:datatype="int"/>
5433                         <field name="grantable" reporter:datatype="bool"/>
5434                         <field name="id" reporter:datatype="id" />
5435                         <field name="perm" reporter:datatype="link"/>
5436                         <field name="usr" reporter:datatype="link"/>
5437                 </fields>
5438                 <links>
5439                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5440                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5441                 </links>
5442         </class>
5443         <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">
5444                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5445                         <field name="object_id" reporter:datatype="text"/>
5446                         <field name="grantable" reporter:datatype="bool"/>
5447                         <field name="id" reporter:datatype="id" />
5448                         <field name="perm" reporter:datatype="link"/>
5449                         <field name="usr" reporter:datatype="link"/>
5450                         <field name="object_type" reporter:datatype="text"/>
5451                 </fields>
5452                 <links>
5453                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5454                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5455                 </links>
5456         </class>
5457         <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">
5458                 <fields oils_persist:primary="id" oils_persist:sequence="">
5459                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5460                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5461                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5462                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5463                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5464                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5465                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5466                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5467                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5468                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5469                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5470                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5471                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5472                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5473                 </fields>
5474                 <links>
5475                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5476                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5477                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5478                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5479                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5480                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5481                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5482                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5483                 </links>
5484         </class>
5485         <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">
5486                 <fields oils_persist:primary="id" oils_persist:sequence="">
5487                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5488                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5489                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5490                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5491                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5492                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5493                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5494                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5495                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5496                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5497                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5498                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5499                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5500                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5501                 </fields>
5502                 <links>
5503                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5504                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5505                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5506                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5507                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5508                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5509                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5510                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5511                 </links>
5512         </class>
5513         <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">
5514                 <fields oils_persist:primary="id" oils_persist:sequence="">
5515                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5516                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5517                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5518                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5519                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5520                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5521                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5522                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5523                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5524                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5525                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5526                 </fields>
5527                 <links>
5528                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5529                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5530                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5531                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5532                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5533                 </links>
5534         </class>
5535         <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">
5536                 <fields oils_persist:primary="id" oils_persist:sequence="">
5537                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5538                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5539                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5540                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5541                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5542                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5543                         <field reporter:label="Accepting User" name="accepting_usr" />
5544                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5545                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5546                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5547                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5548                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5549                 </fields>
5550                 <links>
5551                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5552                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5553                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5554                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5555                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5556                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5557                 </links>
5558         </class>
5559         <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">
5560                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5561                         <field name="bucket" reporter:datatype="link"/>
5562                         <field name="id" reporter:datatype="id" />
5563                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5564                         <field name="create_time" reporter:datatype="timestamp" />
5565                         <field name="pos" reporter:datatype="int" />
5566                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5567                 </fields>
5568                 <links>
5569                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5570                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5571             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5572                 </links>
5573         </class>
5574         <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">
5575                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5576                         <field name="id" reporter:datatype="id" />
5577                         <field name="item" reporter:datatype="link"/>
5578                         <field name="note" reporter:datatype="text" />
5579                 </fields>
5580                 <links>
5581                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5582                 </links>
5583         </class>
5584         <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">
5585                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5586                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5587                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5588                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5589                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5590                 </fields>
5591                 <links>
5592                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5593                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5594                 </links>
5595         </class>
5596     <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">
5597         <fields oils_persist:primary="field">
5598             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5599             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5600             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5601         </fields>
5602         <links/>
5603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5604             <actions>
5605                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5606                 <retrieve />
5607                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5608                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5609             </actions>
5610         </permacrud>
5611     </class>
5612         <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">
5613                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5614                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5615                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5616                 </fields>
5617                 <links/>
5618         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5619             <actions>
5620                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5621                 <retrieve/>
5622                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5623                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5624             </actions>
5625         </permacrud>
5626         </class>
5627
5628
5629         <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">
5630                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5631                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5632                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5633                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5634                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5635                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5636                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5637                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5638                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5639                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5640                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5641                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5642                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5643                 </fields>
5644                 <links>
5645                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5646                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5647                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5648                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5649                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5650                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5651                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5652                 </links>
5653         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5654             <actions>
5655                 <create permission="TRANSIT_COPY">
5656                     <context link="target_copy" field="owner"/>
5657                 </create>
5658                 <retrieve/>
5659                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5660                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5661             </actions>
5662         </permacrud>
5663         </class>
5664         <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">
5665                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5666                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5667                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5668                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5669                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5670                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5671                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5672                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5673                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5674                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5675                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5676                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5677                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5678                 </fields>
5679                 <links>
5680                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5681                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5682                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5683                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5684                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5685                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5686                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5687                 </links>
5688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5689             <actions>
5690                 <create permission="TRANSIT_COPY" context_field="owner">
5691                     <context link="target_copy" field="circ_lib"/>
5692                 </create>
5693                 <retrieve/>
5694                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5695                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5696             </actions>
5697         </permacrud>
5698         </class>
5699         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5700                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5701                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5702                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5703                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5704                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5705                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5706                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5707                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5708                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5709                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5710                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5711                 </fields>
5712                 <links>
5713                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5714                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5715                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5716                 </links>
5717         </class>
5718         <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">
5719                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5720                         <field name="grp" />
5721                         <field name="id" reporter:datatype="id" />
5722                         <field name="usr" />
5723                 </fields>
5724                 <links>
5725                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5726                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5727                 </links>
5728         </class>
5729         <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">
5730                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5731                         <field name="id" reporter:datatype="id" />
5732                         <field name="fq_field" reporter:datatype="text"/>
5733                         <field name="identity_value" reporter:datatype="text"/>
5734                         <field name="translation" reporter:datatype="text"/>
5735                         <field name="string" reporter:datatype="text"/>
5736                 </fields>
5737                 <links>
5738                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5739                 </links>
5740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5741             <actions>
5742                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5743                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5744                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5745                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5746             </actions>
5747         </permacrud>
5748         </class>
5749         <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">
5750                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5751                         <field name="id" reporter:datatype="id" />
5752                         <field name="fm_class" reporter:datatype="text"/>
5753                         <field name="field" reporter:datatype="text"/>
5754                         <field name="owner" reporter:datatype="org_unit"/>
5755                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5756                 </fields>
5757                 <links>
5758                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5759                 </links>
5760         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5761             <actions>
5762                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5763                 <retrieve/>
5764                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5765                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5766             </actions>
5767         </permacrud>
5768         </class>
5769         <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">
5770                 <fields oils_persist:primary="code">
5771                         <field name="code" reporter:datatype="id" />
5772                         <field name="marc_code" reporter:datatype="text"/>
5773                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5774                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5775                 </fields>
5776                 <links/>
5777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5778             <actions>
5779                 <create permission="CREATE_LOCALE" global_required="true"/>
5780                 <retrieve/>
5781                 <update permission="UPDATE_LOCALE" global_required="true"/>
5782                 <delete permission="DELETE_LOCALE" global_required="true"/>
5783             </actions>
5784         </permacrud>
5785         </class>
5786         <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">
5787                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5788                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5789                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5790                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5791             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5792                 </fields>
5793                 <links>
5794                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5795                 </links>
5796         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5797             <actions>
5798                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5799                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5800                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5801                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5802             </actions>
5803         </permacrud>
5804         </class>
5805
5806         <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">
5807                 <fields oils_persist:primary="id">
5808                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5809                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5810                 </fields>
5811                 <links/>
5812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5813             <actions>
5814                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5815                 <retrieve/>
5816                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5817                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5818             </actions>
5819         </permacrud>
5820         </class>
5821
5822         <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">
5823                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5824                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5825                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5826                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5827                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5828                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5829                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5830                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5831                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5832                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5833                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5834                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5835                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5836                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5837                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5838                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5839                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5840                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5841                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5842                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5843                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5844                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5845                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5846                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5847                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5848                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5849                 </fields>
5850                 <links>
5851                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5852                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5853                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5854                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5855                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5856                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5857                 </links>
5858         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5859             <actions>
5860                 <create permission="user_request.create">
5861                     <context link="usr" field="home_ou"/>
5862                                 </create>
5863                 <retrieve permission="user_request.view">
5864                     <context link="usr" field="home_ou"/>
5865                                 </retrieve>
5866                 <update permission="user_request.update">
5867                     <context link="usr" field="home_ou"/>
5868                                 </update>
5869                 <delete permission="user_request.delete">
5870                     <context link="usr" field="home_ou"/>
5871                                 </delete>
5872             </actions>
5873         </permacrud>
5874         </class>
5875
5876         <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">
5877                 <fields oils_persist:primary="code">
5878                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5879                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5880                 </fields>
5881                 <links/>
5882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5883             <actions>
5884                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5885                 <retrieve/>
5886                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5887                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5888             </actions>
5889         </permacrud>
5890         </class>
5891
5892         <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">
5893                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5894                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5895                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5896                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5897                         <field reporter:label="Ratio" name="ratio" />
5898                 </fields>
5899                 <links>
5900                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5901                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5902                 </links>
5903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5904                         <actions>
5905                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5906                                 <retrieve/>
5907                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5908                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5909                         </actions>
5910                 </permacrud>
5911         </class>
5912
5913         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5914                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5915                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5916                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5917                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5918                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5919                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5920                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5921                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5922                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5923                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5924                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5925                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5926                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5927                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5928                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5929                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5930                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5931                 </fields>
5932                 <links>
5933                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5934                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5935             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5936             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5937             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5938                 </links>
5939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5940             <actions>
5941                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5942                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5943                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5944                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5945             </actions>
5946         </permacrud>
5947         </class>
5948
5949         <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">
5950                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5951                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5952                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5953                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5954                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5955                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5956                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5957                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5958                 </fields>
5959                 <links>
5960                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5961                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5962                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5963                 </links>
5964         </class>
5965
5966         <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">
5967                 <fields oils_persist:primary="code">
5968                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5969                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5970                 </fields>
5971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5972             <actions>
5973                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5974                 <retrieve/>
5975                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5976                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5977             </actions>
5978                 </permacrud>
5979         </class>
5980
5981         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5982                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5983                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5984                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5985                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5986                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5987                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5988                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5989                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5990                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5991                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5992                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5993                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5994                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5995                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5996                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5997                 </fields>
5998                 <links>
5999                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6000                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6001                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6002                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6003                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6004                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6005                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6006                 </links>
6007         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6008             <actions>
6009                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6010                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6011                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6012                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6013             </actions>
6014         </permacrud>
6015         </class>
6016
6017         <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">
6018                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6019                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6020                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6021                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6022                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6023                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6024                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6025                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6026                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6027                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6028                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6029                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6030                 </fields>
6031                 <links>
6032                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6033                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6034                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6035                 </links>
6036         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6037             <actions>
6038                 <create   permission="ADMIN_INVOICE">
6039                                         <context link="invoice" field="receiver"/>
6040                                 </create>
6041                 <retrieve permission="ADMIN_INVOICE">
6042                                         <context link="invoice" field="receiver"/>
6043                                 </retrieve>
6044                 <update   permission="ADMIN_INVOICE">
6045                                         <context link="invoice" field="receiver"/>
6046                                 </update>
6047                                 <delete   permission="ADMIN_INVOICE">
6048                                         <context link="invoice" field="receiver"/>
6049                                 </delete>
6050             </actions>
6051         </permacrud>
6052         </class>
6053
6054         <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">
6055                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6056                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6057                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6058                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6059                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6060                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6061                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6062                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6063                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6064                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6065                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6066                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6067                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6068                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6069                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6070                 </fields>
6071                 <links>
6072                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6073                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6074                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6075                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6076                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6077                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6078                 </links>
6079         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6080             <actions>
6081                 <create   permission="ADMIN_INVOICE">
6082                                         <context link="invoice" field="receiver"/>
6083                                 </create>
6084                 <retrieve permission="ADMIN_INVOICE">
6085                                         <context link="invoice" field="receiver"/>
6086                                 </retrieve>
6087                 <update   permission="ADMIN_INVOICE">
6088                                         <context link="invoice" field="receiver"/>
6089                                 </update>
6090                                 <delete   permission="ADMIN_INVOICE">
6091                                         <context link="invoice" field="receiver"/>
6092                                 </delete>
6093             </actions>
6094         </permacrud>
6095         </class>
6096
6097         <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">
6098                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6099                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6100                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6101                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6102                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6103                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6104                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6105                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6106                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6107                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6108                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6109                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6110                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6111                 </fields>
6112                 <links>
6113                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6114                 </links>
6115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6116             <actions>
6117                 <create permission="ADMIN_PROVIDER">
6118                     <context link="provider" field="owner"/>
6119                 </create>
6120                 <retrieve permission="ADMIN_PROVIDER">
6121                     <context link="provider" field="owner"/>
6122                 </retrieve>
6123                 <update permission="ADMIN_PROVIDER">
6124                     <context link="provider" field="owner"/>
6125                 </update>
6126                 <delete permission="ADMIN_PROVIDER">
6127                     <context link="provider" field="owner"/>
6128                 </delete>
6129             </actions>
6130         </permacrud>
6131         </class>
6132
6133         <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">
6134                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6135                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6136                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6137                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6138                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6139                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6140                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6141         </fields>
6142                 <links>
6143                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6144                 </links>
6145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6146             <actions>
6147                 <create permission="ADMIN_PROVIDER">
6148                     <context link="provider" field="owner"/>
6149                 </create>
6150                 <retrieve permission="ADMIN_PROVIDER">
6151                     <context link="provider" field="owner"/>
6152                 </retrieve>
6153                 <update permission="ADMIN_PROVIDER">
6154                     <context link="provider" field="owner"/>
6155                 </update>
6156                 <delete permission="ADMIN_PROVIDER">
6157                     <context link="provider" field="owner"/>
6158                 </delete>
6159             </actions>
6160         </permacrud>
6161     </class>
6162         <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">
6163                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6164                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6165                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6166                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6167                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6168                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6169                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6170                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6171                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6172                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6173                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6174                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6175                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6176                 </fields>
6177                 <links>
6178                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6179                 </links>
6180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6181             <actions>
6182                 <create permission="ADMIN_PROVIDER">
6183                     <context link="contact" jump='provider' field="owner"/>
6184                 </create>
6185                 <retrieve permission="ADMIN_PROVIDER">
6186                     <context link="contact" jump='provider' field="owner"/>
6187                 </retrieve>
6188                 <update permission="ADMIN_PROVIDER">
6189                     <context link="contact" jump='provider' field="owner"/>
6190                 </update>
6191                 <delete permission="ADMIN_PROVIDER">
6192                     <context link="contact" jump='provider' field="owner"/>
6193                 </delete>
6194             </actions>
6195         </permacrud>
6196         </class>
6197
6198         <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">
6199                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6200                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6201                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6202                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6203                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6204                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6205                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6206                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6207                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6208                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6209                 </fields>
6210                 <links>
6211                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6212                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6213                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6214                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6215                 </links>
6216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6217                 </permacrud>
6218         </class>
6219
6220         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6221                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6222                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6223                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6224                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6225                 </fields>
6226                 <links>
6227             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6228                 </links>
6229                 <!--
6230                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6231                         But here's what it should look like if we ever do use pcrud.
6232                 -->
6233                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6234                         <actions>
6235                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6236                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6237                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6238                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6239                         </actions>
6240                 </permacrud>
6241         </class>
6242
6243         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6244                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6245                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6246                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6247                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6248                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6249                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6250                 </fields>
6251                 <links>
6252                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6253                 </links>
6254                 <!--
6255                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6256                         But here's what it should look like if we ever do use pcrud.
6257                 -->
6258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6259                         <actions>
6260                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6261                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6262                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6263                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6264                         </actions>
6265                 </permacrud>
6266         </class>
6267
6268         <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">
6269                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6270                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6271                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6272                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6273                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6274                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6275                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6276                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6277                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6278                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6279                 </fields>
6280                 <links>
6281                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6282                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6283             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6284             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6285                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6286                 </links>
6287         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6288             <actions>
6289                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6290                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6291                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6292                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6293             </actions>
6294         </permacrud>
6295         </class>
6296
6297         <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">
6298                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6299                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6300                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6301                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6302                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6303                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6304                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6305                 </fields>
6306                 <links>
6307                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6308                 </links>
6309                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6310                         <actions>
6311                                 <create permission="ADMIN_FUNDING_SOURCE">
6312                     <context link="funding_source" field="owner"/>
6313                 </create>
6314                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6315                     <context link="funding_source" field="owner"/>
6316                 </retrieve>
6317                                 <update permission="ADMIN_FUNDING_SOURCE">
6318                     <context link="funding_source" field="owner"/>
6319                 </update>
6320                                 <delete permission="ADMIN_FUNDING_SOURCE">
6321                     <context link="funding_source" field="owner"/>
6322                 </delete>
6323                         </actions>
6324                 </permacrud>
6325         </class>
6326
6327         <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">
6328                 <fields oils_persist:primary="id">
6329                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6330                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6331                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6332                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6333                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6334                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6335                 </fields>
6336                 <links>
6337                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6338                 </links>
6339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6340                 </permacrud>
6341         </class>
6342
6343         <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">
6344                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6345                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6346                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6347                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6348                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6349                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6350                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6351                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6352                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6353                 </fields>
6354                 <links>
6355                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6356                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6357                 </links>
6358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6359                         <actions>
6360                                 <create permission="ADMIN_ACQ_FUND">
6361                     <context link="fund" field="org"/>
6362                 </create>
6363                                 <retrieve permission="ADMIN_ACQ_FUND">
6364                     <context link="fund" field="org"/>
6365                 </retrieve>
6366                                 <update permission="ADMIN_ACQ_FUND">
6367                     <context link="fund" field="org"/>
6368                 </update>
6369                                 <delete permission="ADMIN_ACQ_FUND">
6370                     <context link="fund" field="org"/>
6371                 </delete>
6372                         </actions>
6373                 </permacrud>
6374         </class>
6375
6376         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6377                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6378                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6379                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6380                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6381                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6382                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6383                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6384                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6385                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6386                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6387                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6388                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6389                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6390                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6391                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6392                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6393                 </fields>
6394                 <links>
6395                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6396                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6397             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6398             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6399             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6400                 </links>
6401         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6402             <actions>
6403                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6404                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6405                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6406                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6407             </actions>
6408         </permacrud>
6409         </class>
6410
6411         <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">
6412                 <fields oils_persist:primary="fund">
6413                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6414                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6415                 </fields>
6416                 <links>
6417                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6418                 </links>
6419         </class>
6420
6421         <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">
6422                 <fields oils_persist:primary="fund">
6423                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6424                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6425                 </fields>
6426                 <links>
6427                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6428                 </links>
6429         </class>
6430
6431         <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">
6432                 <fields oils_persist:primary="fund">
6433                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6434                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6435                 </fields>
6436                 <links>
6437                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6438                 </links>
6439         </class>
6440
6441         <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">
6442                 <fields oils_persist:primary="fund">
6443                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6444                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6445                 </fields>
6446                 <links>
6447                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6448                 </links>
6449         </class>
6450
6451         <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">
6452                 <fields oils_persist:primary="fund">
6453                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6454                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6455                 </fields>
6456                 <links>
6457                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6458                 </links>
6459         </class>
6460
6461    <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">
6462         <fields oils_persist:primary="fund">
6463             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6464             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6465         </fields>
6466         <links>
6467             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6468         </links>
6469     </class>
6470
6471    <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">
6472         <fields oils_persist:primary="fund">
6473             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6474             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6475         </fields>
6476         <links>
6477             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6478         </links>
6479     </class>
6480
6481    <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">
6482         <fields oils_persist:primary="fund">
6483             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6484             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6485         </fields>
6486         <links>
6487             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6488         </links>
6489     </class>
6490
6491    <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">
6492         <fields oils_persist:primary="fund">
6493             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6494             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6495         </fields>
6496         <links>
6497             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6498         </links>
6499     </class>
6500
6501    <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">
6502         <fields oils_persist:primary="fund">
6503             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6504             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6505         </fields>
6506         <links>
6507             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6508         </links>
6509     </class>
6510
6511         <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">
6512                 <fields oils_persist:primary="funding_source">
6513                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6514                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6515                 </fields>
6516                 <links>
6517                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6518                 </links>
6519         </class>
6520
6521         <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">
6522                 <fields oils_persist:primary="funding_source">
6523                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6524                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6525                 </fields>
6526                 <links>
6527                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6528                 </links>
6529         </class>
6530
6531         <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">
6532                 <fields oils_persist:primary="funding_source">
6533                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6534                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6535                 </fields>
6536                 <links>
6537                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6538                 </links>
6539         </class>
6540
6541         <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">
6542                 <fields oils_persist:primary="fund">
6543                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6544                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6545                 </fields>
6546                 <links>
6547                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6548                 </links>
6549         </class>
6550
6551         <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">
6552                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6553                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6554                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6555                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6556                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6557                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6558                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6559                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6560                 </fields>
6561                 <links>
6562                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6563                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6564                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6565                 </links>
6566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6567                         <actions>
6568                                 <create permission="ADMIN_ACQ_FUND">
6569                     <context link="fund" field="org"/>
6570                 </create>
6571                                 <retrieve permission="ADMIN_ACQ_FUND">
6572                     <context link="fund" field="org"/>
6573                 </retrieve>
6574                                 <update permission="ADMIN_ACQ_FUND">
6575                     <context link="fund" field="org"/>
6576                 </update>
6577                                 <delete permission="ADMIN_ACQ_FUND">
6578                     <context link="fund" field="org"/>
6579                 </delete>
6580                         </actions>
6581                 </permacrud>
6582         </class>
6583
6584     <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">
6585         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6586             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6587             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6588             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6589             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6590             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6591             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6592             <field reporter:label="Note" name="note" reporter:datatype="text" />
6593             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6594         </fields>
6595         <links>
6596             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6597             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6598             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6599         </links>
6600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6601                         <actions>
6602                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6603                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6604                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6605                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6606                         </actions>
6607                 </permacrud>
6608     </class>
6609
6610         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6611                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6612                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6613                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6614                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6615                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6616                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6617                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6618                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6619                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6620                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6621                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6622                 </fields>
6623                 <links>
6624                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6625                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6626                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6627                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6628                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6629                 </links>
6630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6631                         <actions>
6632                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6633                         </actions>
6634                 </permacrud>
6635         </class>
6636
6637         <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">
6638                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6639                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6640                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6641                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6642                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6643                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6644                 </fields>
6645                 <links>
6646                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6647                 </links>
6648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6649                         <actions>
6650                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6651                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6652                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6653                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6654                         </actions>
6655                 </permacrud>
6656         </class>
6657
6658         <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">
6659                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6660                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6661                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6662                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6663                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6664                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6665                         <field reporter:label="State" name="state" reporter:datatype="text" />
6666                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6667                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6668                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6669                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6670                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6671                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6672                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6673                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6674                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6675                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6676                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6677                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6678                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6679                 </fields>
6680                 <links>
6681                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6682                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6683                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6684                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6685                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6686                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6687                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6688                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6689                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6690                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6691                 </links>
6692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6693                         <actions>
6694                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6695                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6696                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6697                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6698                         </actions>
6699                 </permacrud>
6700         </class>
6701
6702         <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">
6703                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6704                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6705                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6706                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6707                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6708                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6709                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6710                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6711                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6712                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6713                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6714                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6715                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6716                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6717                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6718                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6719                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6720                 </fields>
6721                 <links>
6722                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6723                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6724                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6725                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6726                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6727                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6728                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6729                 </links>
6730                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6731             <actions>
6732                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6733             </actions>
6734                 </permacrud>
6735         </class>
6736
6737         <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">
6738                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6739                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6740                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6741                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6742                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6743                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6744                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6745                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6746                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6747                 </fields>
6748                 <links>
6749                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6750                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6751                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6752                 </links>
6753                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6754             <actions>
6755                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6756                     <context link="purchase_order" field="ordering_agency"/>
6757                 </retrieve>
6758                 <create permission="CREATE_PURCHASE_ORDER">
6759                     <context link="purchase_order" field="ordering_agency"/>
6760                 </create>
6761                 <update permission="CREATE_PURCHASE_ORDER">
6762                     <context link="purchase_order" field="ordering_agency"/>
6763                 </update>
6764                 <delete permission="CREATE_PURCHASE_ORDER">
6765                     <context link="purchase_order" field="ordering_agency"/>
6766                 </delete>
6767             </actions>
6768                 </permacrud>
6769         </class>
6770
6771         <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">
6772                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6773                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6774                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6775                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6776                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6777                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6778                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6779                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6780                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6781                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6782                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6783                 </fields>
6784                 <links>
6785                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6786                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6787                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6788                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6789                 </links>
6790                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6791             <actions>
6792                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6793                     <context link="purchase_order" field="ordering_agency"/>
6794                 </retrieve>
6795                 <create permission="CREATE_PURCHASE_ORDER">
6796                     <context link="purchase_order" field="ordering_agency"/>
6797                 </create>
6798                 <update permission="CREATE_PURCHASE_ORDER">
6799                     <context link="purchase_order" field="ordering_agency"/>
6800                 </update>
6801                 <delete permission="CREATE_PURCHASE_ORDER">
6802                     <context link="purchase_order" field="ordering_agency"/>
6803                 </delete>
6804             </actions>
6805                 </permacrud>
6806         </class>
6807
6808         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6809                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6810                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6811                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6812                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6813                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6814                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6815                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6816                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6817                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6818                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6819                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6820                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6821                         <field reporter:label="State" name="state" reporter:datatype="text" />
6822                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6823                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6824                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6825                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6826                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6827                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6828                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6829                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6830                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6831                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6832                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6833                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6834                 </fields>
6835                 <links>
6836                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6837                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6838                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6839                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6840                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6841                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6842                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6843                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6844                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6845                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6846                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6847                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6848                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6849                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6850                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6851                 </links>
6852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6853                         <actions>
6854                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6855                                         <context link="purchase_order" field="ordering_agency"/>
6856                                         <context link="picklist" field="org_unit"/>
6857                                 </retrieve>
6858                         </actions>
6859                 </permacrud>
6860         </class>
6861
6862         <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">
6863                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6864                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6865                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6866                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6867                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6868                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6869                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6870                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6871                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6872                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6873                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6874                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6875                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6876                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6877                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6878                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6879                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6880                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6881                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6882                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6883                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6884                 </fields>
6885                 <links>
6886                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6887                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6888                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6889                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6890                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6891                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6892                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6893                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6894                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6895                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6896                 </links>
6897                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6898                         <actions>
6899                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6900                                         <context link="purchase_order" field="ordering_agency"/>
6901                                         <context link="picklist" field="org_unit"/>
6902                                 </retrieve>
6903                         </actions>
6904                 </permacrud>
6905         </class>
6906
6907         <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">
6908                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6909                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6910                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6911                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6912                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6913                 </fields>
6914                 <links>
6915                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6916                 </links>
6917                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6918                         <actions>
6919                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6920                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6921                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6922                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6923                         </actions>
6924                 </permacrud>
6925         </class>
6926
6927         <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">
6928                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6929                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6930                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6931                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6932                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6933                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6934                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6935                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6936                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6937                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6938                 </fields>
6939                 <links>
6940                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6941                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6942                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6943                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6944                 </links>
6945         </class>
6946
6947         <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">
6948                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6949                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6950                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6951                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6952                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6953                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6954                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6955                 </fields>
6956                 <links>
6957                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6958                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6959                 </links>
6960         </class>
6961
6962         <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">
6963                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6964                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6965                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6966                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6967                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6968                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6969                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6970                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
6971                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6972                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6973                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6974                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6975                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6976                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6977                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6978                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6979                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6980                 </fields>
6981                 <links>
6982                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6983                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6984                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6985                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6986                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6987                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6988                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6989                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6990                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6991                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
6992                 </links>
6993         </class>
6994
6995         <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">
6996                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6997                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6998                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6999                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7000                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7001                 </fields>
7002                 <links/>
7003                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7004                         <actions>
7005                                 <retrieve />
7006                         </actions>
7007                 </permacrud>
7008         </class>
7009
7010         <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">
7011                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7012                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7013                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7014                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7015                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7016                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7017             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7018                 </fields>
7019                 <links/>
7020         <permacrud>
7021             <actions>
7022                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7023                 <retrieve />
7024                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7025                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7026             </actions>
7027         </permacrud>
7028         </class>
7029
7030         <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">
7031                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7032                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7033                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7034                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7035                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7036                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7037                 </fields>
7038                 <links/>
7039         </class>
7040         <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">
7041                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7042                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7043                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7044                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7045                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7046                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7047                 </fields>
7048                 <links>
7049                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7050                 </links>
7051         </class>
7052
7053         <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">
7054             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7055                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7056                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7057                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7058                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7059                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7060                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7061         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7062
7063             </fields>
7064             <links>
7065                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7066             </links>
7067             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7068                 <actions>
7069                     <create permission="ADMIN_PROVIDER">
7070                         <context link="provider" field="owner"/>
7071                     </create>
7072                     <retrieve permission="ADMIN_PROVIDER">
7073                         <context link="provider" field="owner"/>
7074                     </retrieve>
7075                     <update permission="ADMIN_PROVIDER">
7076                         <context link="provider" field="owner"/>
7077                     </update>
7078                     <delete permission="ADMIN_PROVIDER">
7079                         <context link="provider" field="owner"/>
7080                     </delete>
7081                 </actions>
7082             </permacrud>
7083         </class>
7084         
7085         <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">
7086             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7087                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7088                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7089                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7090                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7091             </fields>
7092             <links>
7093                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7094             </links>
7095             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7096                 <actions>
7097                     <create permission="ADMIN_PROVIDER">
7098                         <context link="provider" field="owner"/>
7099                     </create>
7100                     <retrieve permission="ADMIN_PROVIDER">
7101                         <context link="provider" field="owner"/>
7102                     </retrieve>
7103                     <update permission="ADMIN_PROVIDER">
7104                         <context link="provider" field="owner"/>
7105                     </update>
7106                     <delete permission="ADMIN_PROVIDER">
7107                         <context link="provider" field="owner"/>
7108                     </delete>
7109                 </actions>
7110             </permacrud>
7111         </class>
7112         
7113         <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">
7114             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7115                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7116                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7117                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7118                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7119                 </fields>
7120                 <links/>
7121         </class>
7122
7123         <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">
7124                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7125                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7126                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7127                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7128                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7129                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7130                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7131                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7132                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7133                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7134                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7135                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7136                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7137                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7138                 </fields>
7139                 <links>
7140                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7141                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7142                 </links>
7143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7144             <actions>
7145                 <create permission="ADMIN_PROVIDER">
7146                     <context link="provider" field="owner"/>
7147                 </create>
7148                 <retrieve permission="ADMIN_PROVIDER">
7149                     <context link="provider" field="owner"/>
7150                 </retrieve>
7151                 <update permission="ADMIN_PROVIDER">
7152                     <context link="provider" field="owner"/>
7153                 </update>
7154                 <delete permission="ADMIN_PROVIDER">
7155                     <context link="provider" field="owner"/>
7156                 </delete>
7157             </actions>
7158         </permacrud>
7159         </class>
7160
7161         <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">
7162                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7163                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7164                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7165                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7166                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7167                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7168                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7169                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7170                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7171                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7172                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7173                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7174                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7175                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7176                 </fields>
7177                 <links>
7178                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7179                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7180                 </links>
7181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7182             <actions>
7183                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7184                     <context link="account" jump="provider" field="owner"/>
7185                 </retrieve>
7186                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7187                     <context link="account" jump="provider" field="owner"/>
7188                 </update>
7189                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7190                     <context link="account" jump="provider" field="owner"/>
7191                 </delete>
7192             </actions>
7193         </permacrud>
7194         </class>
7195
7196
7197         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7198                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7199                         <field name="id" reporter:datatype="id" />
7200                         <field name="parent" reporter:datatype="link"/>
7201                         <field name="owner" reporter:datatype="link"/>
7202                         <field name="create_time" reporter:datatype="timestamp"/>
7203                         <field name="name" reporter:datatype="text"/>
7204                         <field name="shared" reporter:datatype="bool"/>
7205                         <field name="share_with" reporter:datatype="link"/>
7206                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7207                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7208                 </fields>
7209                 <links>
7210                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7211                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7212                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7213                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7214                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7215                 </links>
7216         </class>
7217         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7218                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7219                         <field name="id" reporter:datatype="id" />
7220                         <field name="parent" reporter:datatype="link"/>
7221                         <field name="owner" reporter:datatype="link"/>
7222                         <field name="create_time" reporter:datatype="timestamp"/>
7223                         <field name="name" reporter:datatype="text"/>
7224                         <field name="shared" reporter:datatype="bool"/>
7225                         <field name="share_with" reporter:datatype="link"/>
7226                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7227                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7228                 </fields>
7229                 <links>
7230                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7231                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7232                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7233                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7234                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7235                 </links>
7236         </class>
7237         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7238                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7239                         <field name="id" reporter:datatype="id" />
7240                         <field name="parent" reporter:datatype="link"/>
7241                         <field name="owner" reporter:datatype="link"/>
7242                         <field name="create_time" reporter:datatype="timestamp"/>
7243                         <field name="name" reporter:datatype="text"/>
7244                         <field name="shared" reporter:datatype="bool"/>
7245                         <field name="share_with" reporter:datatype="link"/>
7246                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7247                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7248                 </fields>
7249                 <links>
7250                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7251                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7252                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7253                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7254                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7255                 </links>
7256         </class>
7257         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7258                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7259                         <field name="id" reporter:datatype="id" />
7260                         <field name="owner" reporter:datatype="link"/>
7261                         <field name="create_time" reporter:datatype="timestamp"/>
7262                         <field name="name" reporter:datatype="text"/>
7263                         <field name="data" reporter:datatype="text"/>
7264                         <field name="folder" reporter:datatype="link"/>
7265                         <field name="description" reporter:datatype="text"/>
7266                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7267                 </fields>
7268                 <links>
7269                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7270                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7271                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7272                 </links>
7273         </class>
7274         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7275                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7276                         <field name="id" reporter:datatype="id" />
7277                         <field name="owner" reporter:datatype="link"/>
7278                         <field name="create_time" reporter:datatype="timestamp"/>
7279                         <field name="template" reporter:datatype="link"/>
7280                         <field name="data" reporter:datatype="text"/>
7281                         <field name="folder" reporter:datatype="link"/>
7282                         <field name="recur" reporter:datatype="bool"/>
7283                         <field name="recurrence" reporter:datatype="interval"/>
7284                         <field name="name" reporter:datatype="text"/>
7285                         <field name="description" reporter:datatype="text"/>
7286                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7287                 </fields>
7288                 <links>
7289                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7290                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7291                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7292                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7293                 </links>
7294         </class>
7295         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7296                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7297                         <field name="id" reporter:datatype="id" />
7298                         <field name="runner" reporter:datatype="link"/>
7299                         <field name="start_time" reporter:datatype="timestamp"/>
7300                         <field name="complete_time" reporter:datatype="timestamp"/>
7301                         <field name="run_time" reporter:datatype="timestamp"/>
7302                         <field name="email" reporter:datatype="text"/>
7303                         <field name="excel_format" reporter:datatype="bool"/>
7304                         <field name="csv_format" reporter:datatype="bool"/>
7305                         <field name="html_format" reporter:datatype="bool"/>
7306                         <field name="error_code" reporter:datatype="int"/>
7307                         <field name="error_text" reporter:datatype="text"/>
7308                         <field name="report" reporter:datatype="link"/>
7309                         <field name="folder" reporter:datatype="link"/>
7310                         <field name="chart_pie" reporter:datatype="bool"/>
7311                         <field name="chart_bar" reporter:datatype="bool"/>
7312                         <field name="chart_line" reporter:datatype="bool"/>
7313                 </fields>
7314                 <links>
7315                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7316                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7317                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7318                 </links>
7319         </class>
7320         <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">
7321                 <fields oils_persist:primary="id">
7322                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7323                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7324                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7325                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7326                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7327                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7328                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7329                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7330                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7331                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7332                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7333                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7334                 </fields>
7335                 <links>
7336                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7337                 </links>
7338         </class>
7339         <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">
7340                 <fields oils_persist:primary="id">
7341                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7342                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7343                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7344                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7345                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7346                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7347                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7348                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7349                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7350                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7351                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7352                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7353                 </fields>
7354                 <links>
7355                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7356                 </links>
7357         </class>
7358         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7359                 <fields oils_persist:primary="id">
7360                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7361                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7362                         <field reporter:label="Fingerprint" name="fingerprint" />
7363                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7364                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7365                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7366                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7367                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7368                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7369                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7370                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7371                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7372                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7373                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7374                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7375                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7376                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7377                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7378                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7379                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7380                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7381                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7382                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7383                 </fields>
7384                 <links>
7385                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7386                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7387                 </links>
7388         </class>
7389         <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">
7390                 <fields oils_persist:primary="id">
7391                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7392                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7393                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7394                 </fields>
7395                 <links>
7396                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7397                 </links>
7398         </class>
7399         <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">
7400                 <fields oils_persist:primary="id">
7401                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7402                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7403                 </fields>
7404                 <links>
7405                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7406                 </links>
7407         </class>
7408         <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">
7409                 <fields oils_persist:primary="id">
7410                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7411                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7412                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7413                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7414                 </fields>
7415                 <links>
7416                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7417                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7418                 </links>
7419         </class>
7420         <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">
7421                 <fields oils_persist:primary="xact">
7422                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7423                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7424                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7425                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7426                 </fields>
7427                 <links>
7428                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7429                 </links>
7430         </class>
7431         <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">
7432                 <fields oils_persist:primary="xact">
7433                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7434                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7435                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7436                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7437                 </fields>
7438                 <links>
7439                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7440                 </links>
7441         </class>
7442         <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)">
7443                 <fields oils_persist:primary="id">
7444                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7445                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7446                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7447                 </fields>
7448                 <links>
7449                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7450                 </links>
7451         </class>
7452         <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">
7453                 <fields oils_persist:primary="id">
7454                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7455                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7456                 </fields>
7457                 <links>
7458                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7459                 </links>
7460         </class>
7461         <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">
7462                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7463                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7464                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7465                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7466                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7467                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7468                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7469                 </fields>
7470                 <links>
7471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7472                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7473                 </links>
7474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7475                         <actions>
7476                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7477                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7478                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7479                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7480                         </actions>
7481                 </permacrud>
7482         </class>
7483         <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">
7484                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7485                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7486                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7487                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7488                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7489                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7490                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7491                 </fields>
7492                 <links>
7493                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7494                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7495                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7496                 </links>
7497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7498                         <actions>
7499                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7500                                         <context link="formula" field="owner"/>
7501                                 </create>
7502                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7503                                         <context link="formula" field="owner"/>
7504                                 </retrieve>
7505                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7506                                         <context link="formula" field="owner"/>
7507                                 </update>
7508                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7509                                         <context link="formula" field="owner"/>
7510                                 </delete>
7511                         </actions>
7512                 </permacrud>
7513         </class>
7514
7515         <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">
7516                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7517                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7518                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7519                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7520                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7521                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7522                 </fields>
7523                 <links>
7524                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7525                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7526                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7527                 </links>
7528                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7529                         <actions>
7530                                 <create permission="CREATE_PURCHASE_ORDER">
7531                                         <context link="formula" field="owner"/>
7532                 </create>
7533                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7534                                         <context link="formula" field="owner"/>
7535                 </retrieve>
7536                                 <update permission="CREATE_PURCHASE_ORDER">
7537                                         <context link="formula" field="owner"/>
7538                 </update>
7539                                 <delete permission="CREATE_PURCHASE_ORDER">
7540                                         <context link="formula" field="owner"/>
7541                 </delete>
7542                         </actions>
7543                 </permacrud>
7544         </class>
7545
7546         <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">
7547                 <fields oils_persist:primary="id">
7548                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7549                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7550                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7551                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7552                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7553                 </fields>
7554                 <links>
7555                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7556                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7557                 </links>
7558                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7559                 </permacrud>
7560         </class>
7561
7562         <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">
7563                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7564                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7565                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7566                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7567                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7568                 </fields>
7569                 <links>
7570                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7571                 </links>
7572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7573                         <actions>
7574                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7575                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7576                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7577                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7578                         </actions>
7579                 </permacrud>
7580         </class>
7581
7582         <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">
7583                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7584                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7585                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7586                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7587                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7588                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7589                 </fields>
7590                 <links>
7591                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7592                 </links>
7593                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7594                         <actions>
7595                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7596                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7597                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7598                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7599                         </actions>
7600                 </permacrud>
7601         </class>
7602
7603         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7604                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7605                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7606                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7607                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7608                 </fields>
7609                 <links>
7610                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7611                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7612                 </links>
7613                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7614                 </permacrud>
7615         </class>
7616
7617         <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">
7618                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7619                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7620                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7621                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7622                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7623                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7624                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7625                 </fields>
7626                 <links>
7627                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7628                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7629                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7630                 </links>
7631                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7632                 </permacrud>
7633         </class>
7634
7635         <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">
7636                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7637                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7638                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7639                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7640                 </fields>
7641                 <links>
7642                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7643                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7644                 </links>
7645                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7646                 </permacrud>
7647         </class>
7648
7649         <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">
7650                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7651                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7652                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7653                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7654                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7655                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7656                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7657                 </fields>
7658                 <links>
7659                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7660                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7661                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7662                 </links>
7663                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7664                 </permacrud>
7665         </class>
7666
7667         <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">
7668                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7669                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7670                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7671                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7672                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7673                 </fields>
7674                 <links>
7675                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7676                 </links>
7677                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7678             <actions>
7679                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7680                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7681                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7682                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7683             </actions>
7684                 </permacrud>
7685         </class>
7686
7687         <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">
7688                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7689                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7690                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7691                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7692                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7693                 </fields>
7694                 <links>
7695                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7696                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7697                 </links>
7698                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7699                         <actions>
7700                                 <create permission="ADMIN_CLAIM_POLICY">
7701                                         <context link="claim_policy" field="org_unit"/>
7702                 </create>
7703                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7704                                         <context link="claim_policy" field="org_unit"/>
7705                 </retrieve>
7706                                 <update permission="ADMIN_CLAIM_POLICY">
7707                                         <context link="claim_policy" field="org_unit"/>
7708                 </update>
7709                                 <delete permission="ADMIN_CLAIM_POLICY">
7710                                         <context link="claim_policy" field="org_unit"/>
7711                 </delete>
7712                         </actions>
7713                 </permacrud>
7714         </class>
7715
7716     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7717         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7718             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7719             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7720             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7721             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7722             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7723             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7724             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7725             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7726             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7727             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7728             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7729             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7730             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7731             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7732             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7733         </fields>
7734     </class>
7735
7736     <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">
7737         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7738             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7739             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7740             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7741             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7742             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7743         </fields>
7744     </class>
7745
7746     <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">
7747         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7748             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7749             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7750             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7751             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7752             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7753             <field reporter:label="City" name="city" reporter:datatype="text"/>
7754             <field reporter:label="State" name="state" reporter:datatype="text"/>
7755             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7756             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7757             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7758         </fields>
7759     </class>
7760
7761     <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">
7762         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7763             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7764             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7765             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7766             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7767             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7768             <field reporter:label="City" name="city" reporter:datatype="text"/>
7769             <field reporter:label="State" name="state" reporter:datatype="text"/>
7770             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7771             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7772             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7773         </fields>
7774     </class>
7775
7776     <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">
7777         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7778             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7779             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7780             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7781             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7782             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7783             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7784         </fields>
7785     </class>
7786
7787         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7788                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7789                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7790                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7791                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7792                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7793                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7794                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7795                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7796                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7797                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7798                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7799                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7800                 </fields>
7801                 <links>
7802                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7803                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7804                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7805                 </links>
7806                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7807                 </permacrud>
7808         </class>
7809
7810         <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">
7811                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7812                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7813                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7814                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7815                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7816                 </fields>
7817                 <links>
7818                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7819                 </links>
7820                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7821                 </permacrud>
7822         </class>
7823
7824     <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">
7825         <fields>
7826             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7827             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7828             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7829         </fields>
7830                 <links>
7831                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7832                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7833                 </links>
7834     </class>
7835
7836     <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">
7837         <fields>
7838             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7839             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7840         </fields>
7841                 <links>
7842                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7843                 </links>
7844     </class>
7845
7846     <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">
7847         <fields>
7848             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7849             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7850             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7851         </fields>
7852                 <links>
7853                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7854                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7855                 </links>
7856     </class>
7857
7858     <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">
7859         <fields>
7860             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7861             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7862         </fields>
7863                 <links>
7864                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7865                 </links>
7866     </class>
7867
7868     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7869                 <oils_persist:source_definition>
7870
7871             SELECT  DISTINCT l.*
7872               FROM  action.unfulfilled_hold_loops l
7873                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7874               WHERE l.count = m.max
7875
7876                 </oils_persist:source_definition>
7877         <fields>
7878             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7879             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7880             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7881         </fields>
7882                 <links>
7883                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7884                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7885                 </links>
7886     </class>
7887
7888         <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">
7889                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7890                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7891                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7892                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7893                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7894                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7895                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7896                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7897                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7898                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7899                 </fields>
7900                 <links>
7901                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7902                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7903                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7904                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7905                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7906                 </links>
7907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7908                 </permacrud>
7909         </class>
7910
7911         <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">
7912                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7913                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7914                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7915                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7916                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7917                 </fields>
7918                 <links>
7919                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7920                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7921                 </links>
7922                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7923                 </permacrud>
7924         </class>
7925
7926         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7927                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7928                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7929                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7930                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7931                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7932                 </fields>
7933                 <links>
7934                 </links>
7935                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7936                 </permacrud>
7937         </class>
7938
7939         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7940                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7941                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7942                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7943                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7944                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7945                 </fields>
7946                 <links>
7947                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7948                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7949                 </links>
7950                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7951                 </permacrud>
7952         </class>
7953         
7954         <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">
7955                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7956                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7957                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7958                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7959                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7960                 </fields>
7961                 <links>
7962                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7963                 </links>
7964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7965                 </permacrud>
7966         </class>
7967         
7968         <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">
7969                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7970                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7971                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7972                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7973                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7974                 </fields>
7975                 <links>
7976                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7977                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7978                 </links>
7979                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7980                 </permacrud>
7981         </class>
7982
7983         <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">
7984                 <fields oils_persist:primary="name">
7985                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7986                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7987                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7988                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7989                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7990                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7991                 </fields>
7992                 <links>
7993                 </links>
7994                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7995                 </permacrud>
7996         </class>
7997
7998         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7999                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8000                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8001                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8002                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8003                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8004                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8005                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8006                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8007                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8008                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8009                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8010                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8011                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8012                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8013                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8014                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8015                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8016                 </fields>
8017                 <links>
8018                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8019                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8020                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8021                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8022                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8023                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8024                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8025                 </links>
8026                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8027                 </permacrud>
8028         </class>
8029
8030         <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">
8031                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8032                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8033                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8034                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8035                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8036                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8037                 </fields>
8038                 <links>
8039                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8040                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8041                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8042                 </links>
8043                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8044                 </permacrud>
8045         </class>
8046
8047         <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">
8048                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8049                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8050                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8051                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8052                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8053                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8054                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8055                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8056                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8057                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8058                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8059                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8060                 </fields>
8061                 <links>
8062                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8063                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8064                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8065                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8066                 </links>
8067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8068                 </permacrud>
8069         </class>
8070
8071         <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">
8072                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8073                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8074                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8075                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8076                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8077                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8078                 </fields>
8079                 <links>
8080                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8081                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8082                 </links>
8083                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8084                 </permacrud>
8085         </class>
8086
8087         <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">
8088                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8089                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8090                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8091                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8092                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8093                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8094                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8095                 </fields>
8096                 <links>
8097                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8098                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8099                 </links>
8100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8101                 </permacrud>
8102         </class>
8103
8104         <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">
8105                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8106                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8107                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8108                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8109                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8110                 </fields>
8111                 <links>
8112                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8113                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8114                 </links>
8115                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8116                 </permacrud>
8117         </class>
8118
8119         <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">
8120                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8121                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8122                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8123                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8124                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8125                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8126                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8127                 </fields>
8128                 <links>
8129                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8130                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8131                 </links>
8132                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8133                 </permacrud>
8134         </class>
8135
8136         <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">
8137                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8138                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8139                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8140                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8141                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8142                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8143                 </fields>
8144                 <links>
8145                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8146                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8147                 </links>
8148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8149                 </permacrud>
8150         </class>
8151
8152         <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">
8153                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8154                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8155                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8156                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8157                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8158                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8159                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8160                 </fields>
8161                 <links>
8162                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8163                 </links>
8164                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8165                 </permacrud>
8166         </class>
8167
8168         <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">
8169                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8170                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8171                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8172                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8173                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8174                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8175                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8176                 </fields>
8177                 <links>
8178                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8179                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8180                 </links>
8181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8182                 </permacrud>
8183         </class>
8184
8185         <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">
8186                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8187                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8188                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8189                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8190                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8191                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8192                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8193                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8194                 </fields>
8195                 <links>
8196                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8197                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8198                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8199                 </links>
8200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8201                 </permacrud>
8202         </class>
8203
8204         <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">
8205                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8206                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8207                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8208                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8209                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8210                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8211                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8212                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8213                 </fields>
8214                 <links>
8215                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8216                 </links>
8217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8218                 </permacrud>
8219         </class>
8220
8221         <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">
8222                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8223                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8224                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8225                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8226                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8227                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8228                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8229                 </fields>
8230                 <links>
8231                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8232                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8233                 </links>
8234                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8235                 </permacrud>
8236         </class>
8237
8238         <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">
8239                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8240                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8241                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8242                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8243                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8244                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8245                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8246                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8247                 </fields>
8248                 <links>
8249                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8250                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8251                 </links>
8252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8253                 </permacrud>
8254         </class>
8255
8256         <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">
8257                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8258                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8259                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8260                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8261                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8262                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8263                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8264                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8265                 </fields>
8266                 <links>
8267                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8268                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8269                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8270                 </links>
8271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8272                 </permacrud>
8273         </class>
8274
8275         <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">
8276                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8277                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8278                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8279                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8280                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8281                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8282                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8283                 </fields>
8284                 <links>
8285                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8286                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8287                 </links>
8288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8289                 </permacrud>
8290         </class>
8291
8292         <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">
8293                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8294                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8295                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8296                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8297                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8298                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8299                 </fields>
8300                 <links>
8301                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8302                 </links>
8303                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8304                 </permacrud>
8305         </class>
8306
8307         <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">
8308                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8309                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8310                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8311                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8312                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8313                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8314                 </fields>
8315                 <links>
8316                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8317                 </links>
8318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8319                 </permacrud>
8320         </class>
8321
8322         <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">
8323                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8324                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8325                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8326                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8327                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8328                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8329                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8330                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8331                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8332                 </fields>
8333                 <links>
8334                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8335                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8336                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8337                 </links>
8338                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8339                 </permacrud>
8340         </class>
8341
8342         <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">
8343                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8344                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8345                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8346                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8347                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8348                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8349                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8350                 </fields>
8351                 <links>
8352                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8353                 </links>
8354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8355                 </permacrud>
8356         </class>
8357
8358         <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">
8359                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8360                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8361                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8362                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8363                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8364                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8365                 </fields>
8366                 <links>
8367                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8368                 </links>
8369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8370                 </permacrud>
8371         </class>
8372
8373         <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">
8374                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8375                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8376                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8377                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8378                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8379                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8380                 </fields>
8381                 <links>
8382                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8383                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8384                 </links>
8385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8386                 </permacrud>
8387         </class>
8388
8389         <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">
8390                 <fields oils_persist:primary="id">
8391                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8392                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8393                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8394                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8395                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8396                 </fields>
8397                 <links>
8398                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8399                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8400                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8401                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8402                 </links>
8403         </class>
8404
8405         <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">
8406                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8407                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8408                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8409                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8410                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8411                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8412                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8413                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8414                 </fields>
8415                 <links/>
8416                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8417                         <actions>
8418                                 <retrieve/>
8419                         </actions>
8420                 </permacrud>
8421         </class>
8422
8423         <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">
8424                 <fields oils_persist:primary="ptype_key">
8425                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8426                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8427                 </fields>
8428                 <links/>
8429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8430                         <actions>
8431                                 <retrieve/>
8432                         </actions>
8433                 </permacrud>
8434         </class>
8435
8436         <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">
8437                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8438                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8439                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8440                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8441                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8442                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8443                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8444                 </fields>
8445                 <links>
8446                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8447                 </links>
8448                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8449                         <actions>
8450                                 <retrieve/>
8451                         </actions>
8452                 </permacrud>
8453         </class>
8454
8455         <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">
8456                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8457                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8458                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8459                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8460                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8461                 </fields>
8462                 <links>
8463                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8464                 </links>
8465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8466                         <actions>
8467                                 <retrieve/>
8468                         </actions>
8469                 </permacrud>
8470         </class>
8471
8472         <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">
8473                 <fields oils_persist:primary="code">
8474                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8475                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8476                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8477                 </fields>
8478                 <links/>
8479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8480                         <actions>
8481                                 <retrieve/>
8482                         </actions>
8483                 </permacrud>
8484         </class>
8485
8486         <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">
8487                 <oils_persist:source_definition>
8488
8489             SELECT  b.id,
8490                     MAX(dcp.edit_date) AS last_delete_date
8491              FROM   biblio.record_entry b
8492                     JOIN asset.call_number cn ON (cn.record = b.id)
8493                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8494              WHERE  NOT b.deleted
8495              GROUP BY b.id
8496              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8497
8498                 </oils_persist:source_definition>
8499                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8500                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8501                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8502                 </fields>
8503                 <links>
8504                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8505                 </links>
8506                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8507                         <actions>
8508                                 <retrieve/>
8509                         </actions>
8510                 </permacrud>
8511         </class>
8512
8513         <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">
8514                 <oils_persist:source_definition>
8515
8516             -- -- 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.
8517             -- -- 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
8518             -- -- may not.
8519             -- SELECT
8520             --     bre.id AS "bib_id",
8521             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8522             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8523             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8524             -- FROM (
8525                 SELECT
8526                     y.bre AS "id",
8527                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8528                     y.hold_count AS "hold_count",
8529                     (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"
8530                 FROM (
8531                         SELECT
8532                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8533                             COUNT(*) AS "hold_count"
8534                         FROM action.hold_request h
8535                         WHERE
8536                             cancel_time IS NULL
8537                             AND fulfillment_time IS NULL
8538                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8539                         GROUP BY 1
8540                     )y LEFT JOIN (
8541                         SELECT 
8542                             (SELECT id
8543                                 FROM biblio.record_entry 
8544                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8545                             ) AS "bre", 
8546                             COUNT(*) AS "copy_count"
8547                         FROM asset.copy
8548                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8549                         WHERE copy.holdable 
8550                             AND NOT copy.deleted 
8551                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8552                         GROUP BY 1
8553                     )x ON x.bre = y.bre
8554                 -- )z RIGHT JOIN (
8555                 --     SELECT id
8556                 --     FROM biblio.record_entry
8557                 --     WHERE NOT deleted
8558                 -- )bre ON (z.bib_id = bre.id)
8559                 
8560
8561                 </oils_persist:source_definition>
8562                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8563                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8564                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8565                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8566                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8567                 </fields>
8568                 <links>
8569                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8570                 </links>
8571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8572                         <actions>
8573                                 <retrieve/>
8574                         </actions>
8575                 </permacrud>
8576         </class>
8577
8578         <!-- ********************************************************************************************************************* -->
8579         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8580         <!-- ********************************************************************************************************************* -->
8581         <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">
8582                 <fields oils_persist:primary="id">
8583                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8584                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8585                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8586                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8587                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8588                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8589                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8590                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8591                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8592                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8593                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8594                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8595                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8596                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8597                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8598                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8599                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8600                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8601                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8602                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8603                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8604                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8605                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8606                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8607                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8608                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8609                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8610                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8611                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8612                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8613                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8614                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8615                 </fields>
8616                 <links>
8617                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8618                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8619                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8620                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8621                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8622                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8623                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8624                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8625                 </links>
8626         </class>
8627
8628         <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">
8629                 <fields oils_persist:primary="id">
8630                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8631                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8632                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8633                 </fields>
8634                 <links>
8635                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8636                 </links>
8637         </class>
8638
8639         <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">
8640                 <fields oils_persist:primary="id">
8641                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8642                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8643                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8644                 </fields>
8645                 <links>
8646                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8647                 </links>
8648         </class>
8649
8650         <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">
8651                 <fields oils_persist:primary="id">
8652                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8653
8654                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8655                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8656                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8657
8658                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8659                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8660                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8661
8662                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8663                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8664
8665                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8666                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8667                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8668
8669                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8670                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8671
8672                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8673                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8674                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8675
8676                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8677                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8678                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8679
8680                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8681                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8682                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8683                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8684
8685                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8686                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8687
8688                 </fields>
8689                 <links>
8690                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8691                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8692                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8693                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8694                 </links>
8695         </class>
8696
8697         <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">
8698                 <oils_persist:source_definition>
8699
8700             SELECT
8701                 po.ordering_agency AS ordering_agency,
8702                 po.id AS purchase_order,
8703                 li.id AS lineitem,
8704                 lid.id AS lineitem_detail,
8705                 cpa.id AS claim_policy_action
8706             FROM
8707                 acq.lineitem_detail lid
8708                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8709                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8710                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8711                 JOIN acq.claim_policy_action cpa ON (
8712                     cpa.claim_policy = cp.id
8713
8714                     -- we only care about claim policy actions whose claim
8715                     -- interval we'd reached or exceeded
8716                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8717
8718                     -- filter out all claim policy actions where claim events
8719                     -- have occurred on or after the action's action_interval
8720                     AND NOT EXISTS (
8721                         SELECT 1
8722                         FROM
8723                             acq.claim_event evt
8724                             JOIN acq.claim claim ON (
8725                                 claim.id = evt.claim
8726                                 AND claim.lineitem_detail = lid.id
8727                             )
8728                         WHERE
8729                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8730                     )
8731                 )
8732             WHERE
8733                 lid.cancel_reason IS NULL
8734                 AND li.cancel_reason IS NULL -- belt/suspenders
8735                 AND po.cancel_reason IS NULL -- belt/suspenders
8736                 AND lid.recv_time IS NULL
8737                 AND po.state = 'on-order'
8738             ORDER BY 1, 2, 3, 4, 5
8739
8740                 </oils_persist:source_definition>
8741                 <fields>
8742                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8743                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8744                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8745                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8746                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8747                 </fields>
8748                 <links>
8749                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8750                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8751                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8752                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8753                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8754                 </links>
8755         </class>
8756
8757         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8758                 <oils_persist:source_definition>
8759
8760             SELECT 
8761                 li.id AS lineitem, 
8762                 (
8763                     SELECT COUNT(lid.id) 
8764                     FROM acq.lineitem_detail lid
8765                     WHERE lineitem = li.id
8766                 ) AS item_count,
8767                 (
8768                     SELECT COUNT(lid.id) 
8769                     FROM acq.lineitem_detail lid
8770                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8771                 ) AS recv_count,
8772                 (
8773                     SELECT COUNT(lid.id) 
8774                     FROM acq.lineitem_detail lid
8775                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8776                 ) AS cancel_count,
8777                 (
8778                     SELECT COUNT(lid.id) 
8779                     FROM acq.lineitem_detail lid
8780                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8781                     WHERE NOT debit.encumbrance AND lineitem = li.id
8782                 ) AS invoice_count,
8783                 (
8784                     SELECT COUNT(DISTINCT(lid.id)) 
8785                     FROM acq.lineitem_detail lid
8786                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8787                     WHERE lineitem = li.id
8788                 ) AS claim_count,
8789                 (
8790                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8791                     FROM acq.lineitem_detail lid
8792                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8793                 ) AS estimated_amount,
8794                 (
8795                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8796                     FROM acq.lineitem_detail lid
8797                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8798                     WHERE debit.encumbrance AND lineitem = li.id
8799                 ) AS encumbrance_amount,
8800                 (
8801                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8802                     FROM acq.lineitem_detail lid
8803                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8804                     WHERE NOT debit.encumbrance AND lineitem = li.id
8805                 ) AS paid_amount
8806
8807                 FROM acq.lineitem AS li
8808         </oils_persist:source_definition>
8809                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8810                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8811                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8812                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8813                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8814                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8815                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8816                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8817                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8818                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8819                 </fields>
8820                 <links>
8821                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8822                 </links>
8823     </class>
8824
8825
8826         <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">
8827                 <oils_persist:source_definition>
8828
8829                         SELECT  t.*
8830                           FROM  action.transit_copy t
8831                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8832                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8833                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8834
8835                 </oils_persist:source_definition>
8836                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8837                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8838                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8839                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8840                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8841                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8842                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8843                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8844                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8845                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8846                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8847                 </fields>
8848                 <links>
8849                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8850                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8851                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8852                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8853                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8854                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8855                 </links>
8856         </class>
8857
8858     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8859                 <oils_persist:source_definition>
8860
8861         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8862                 SELECT
8863                         cp.id as copy,
8864                         COUNT(circ.id),
8865                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8866                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8867                 FROM
8868                         asset.copy cp
8869                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8870                 GROUP BY 1, 3, 4
8871                 UNION
8872                 SELECT
8873                         cp.id as copy,
8874                         COUNT(circ.id),
8875                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8876                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8877                 FROM
8878                         asset.copy cp
8879                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8880                 GROUP BY 1, 3, 4
8881                 UNION
8882                 SELECT
8883                         id as copy,
8884                         circ_count,
8885                         -1 AS year,
8886                         false as is_renewal
8887                 FROM
8888                         extend_reporter.legacy_circ_count
8889         )x GROUP BY 1, 3, 4
8890
8891                 </oils_persist:source_definition>
8892         <fields>
8893             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8894             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8895             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8896             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8897         </fields>
8898                 <links>
8899                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8900                 </links>
8901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8902                         <actions>
8903                                 <retrieve/>
8904                         </actions>
8905                 </permacrud>
8906     </class>
8907
8908         <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">
8909                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8910                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8911                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8912                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8913                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8914                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8915                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8916                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8917                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8918                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8919                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8920                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8921                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8922                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8923                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8924                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8925                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8926                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8927                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8928                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8929                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8930                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8931                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8932                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8933                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8934                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8935                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8936                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8937                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8938                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8939                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8940                 </fields>
8941                 <links>
8942                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8943                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8944                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8945                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8946                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8947                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8948                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8949                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8950                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8951                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8952                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8953                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8954                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8955                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8956                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8957                 </links>
8958         </class>
8959
8960     <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">
8961         <fields oils_persist:primary="id">
8962             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8963             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8964             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8965             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8966             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8967             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8968             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8969             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8970             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8971             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8972             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8973             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8974             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8975             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8976             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8977             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8978             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8979             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8980             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8981             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8982             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8983             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8984             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8985             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8986             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8987             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8988             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8989             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8990             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8991             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8992             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8993             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8994             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8995             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8996         </fields>
8997         <links>
8998             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8999             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9000             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9001             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9002             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9003         </links>
9004     </class>
9005
9006     <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">
9007         <fields oils_persist:primary="id">
9008             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9009             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9010             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9011             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9012         </fields>
9013         <links>
9014             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9015             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9016         </links>
9017     </class>
9018
9019     <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">
9020         <fields oils_persist:primary="owning_lib">
9021             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9022             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9023             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9024         </fields>
9025         <links>
9026             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9027         </links>
9028     </class>
9029
9030     <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">
9031         <fields oils_persist:primary="id">
9032             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9033             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9034             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9035             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9036             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9037         </fields>
9038         <links>
9039             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9040             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9041             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9042         </links>
9043     </class>
9044
9045     <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">
9046         <fields oils_persist:primary="circ_lib">
9047             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9048             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9049             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9050             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9051         </fields>
9052         <links>
9053             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9054             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9055         </links>
9056     </class>
9057
9058     <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">
9059         <fields oils_persist:primary="id">
9060             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9061             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9062             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9063             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9064             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9065         </fields>
9066         <links>
9067             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9068             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9069             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9070         </links>
9071     </class>
9072
9073     <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">
9074         <fields oils_persist:primary="home_ou">
9075             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9076             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9077             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9078             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9079         </fields>
9080         <links>
9081             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9082             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9083         </links>
9084     </class>
9085         <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">
9086                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9087                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9088                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9089                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9090                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9091                 </fields>
9092                 <links>
9093                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9094                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9095                 </links>
9096                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9097                         <actions>
9098                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9099                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9100                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9101                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9102                         </actions>
9103                 </permacrud>
9104         </class>
9105         <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">
9106                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9107                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9108                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9109                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9110                 </fields>
9111                 <links>
9112                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9113                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9114                         </links>
9115                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9116                 <actions>
9117                                 <create permission="ADMIN_ACQ_FUND_TAG">
9118                                         <context link="tag" field="owner"/>
9119                                 </create>
9120                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9121                                         <context link="tag" field="owner"/>
9122                                 </retrieve>
9123                                 <update permission="ADMIN_ACQ_FUND_TAG">
9124                                         <context link="tag" field="owner"/>
9125                                 </update>
9126                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9127                                         <context link="tag" field="owner"/>
9128                                 </delete>
9129                         </actions>
9130                 </permacrud>
9131         </class>
9132         <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">
9133                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9134                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9135                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9136                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9137                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9138                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9139                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9140                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9141                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9142                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9143                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9144                 </fields>
9145                 <links>
9146                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9147                 </links>
9148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9149                         <actions>
9150                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9151                                 <retrieve/>
9152                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9153                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9154                         </actions>
9155                 </permacrud>
9156         </class>
9157
9158         <!-- ********************************************************************************************************************* -->
9159
9160 </IDL>
9161
9162 <!--
9163     vim:noet:ts=4:sw=4:
9164 -->